-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32150/#review81139
-----------------------------------------------------------


Looks good to me, MPark.

Several high-level questions (some of them are duplicated in the issues):
* Why don't we want to check that request `principal` matches 
`FrameworkInfo.principal` in unreserve operation?
* Can we dynamically unreserve statically reserved resources? Could you please 
add a test for this?


src/master/master.cpp
<https://reviews.apache.org/r/32150/#comment131401>

    These two fields are optional, `principal` doesn't have a default. Do we 
need to check it? Can a framework without a principal reserve resources (the 
answer is no, I suppose, because in the current desgin a principal register 
resources, not a framework)?
    
    DO you mind adding tests for these cases?



src/master/validation.cpp
<https://reviews.apache.org/r/32150/#comment131404>

    Let's leave a comment here that `resource::validate` not only checks for 
integrity of the `resources` instance, but also for inconsistent state related 
to dynamic reservations. Since `resource::validate` doesn't have any comment 
it's unclear here that it does a related but non-obvious check for "*" role.



src/master/validation.cpp
<https://reviews.apache.org/r/32150/#comment131407>

    Shall we check framework and request principals are the same?



src/tests/master_validation_tests.cpp
<https://reviews.apache.org/r/32150/#comment131410>

    const?



src/tests/master_validation_tests.cpp
<https://reviews.apache.org/r/32150/#comment131411>

    As I have mentioned earlier, how about a test where we `FrameworkInfo` 
doesn't have a principal?



src/tests/master_validation_tests.cpp
<https://reviews.apache.org/r/32150/#comment131412>

    const? here and below.



src/tests/master_validation_tests.cpp
<https://reviews.apache.org/r/32150/#comment131413>

    You don't use `principal` in unreserve, is this comment valid then? As I 
have already mentioned, I would rather check for principal match though.



src/tests/master_validation_tests.cpp
<https://reviews.apache.org/r/32150/#comment131414>

    Don't you get an unused variable warning?


- Alexander Rukletsov


On April 15, 2015, 3:55 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32150/
> -----------------------------------------------------------
> 
> (Updated April 15, 2015, 3:55 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu.
> 
> 
> Bugs: MESOS-2139
>     https://issues.apache.org/jira/browse/MESOS-2139
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Handled reservation operations in `Master::_accept`.
> 
> Added `validate` functions in `src/master/validation.{hpp,cpp}`.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp 618db68ee4163b06e479cf3413eda4b63c9c5a4b 
>   src/master/validation.hpp 2d7416c053f82d6316542fa9c35b0e7bc605abec 
>   src/master/validation.cpp 2f2e4ea8ea123c5a0d01446cdec8b308ea60932e 
>   src/tests/master_validation_tests.cpp 
> 4f2ad58c3ae0f611fb476c4d91a37dd6a5541395 
> 
> Diff: https://reviews.apache.org/r/32150/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to