mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gastón Kleiman <gas...@mesosphere.com>
Subject Re: Review Request 52642: Improved the validation of RESERVE operations.
Date Fri, 04 Nov 2016 12:50:43 GMT


> On Nov. 3, 2016, 10:39 p.m., Benjamin Mahler wrote:
> > src/master/validation.cpp, lines 1454-1456
> > <https://reviews.apache.org/r/52642/diff/2/?file=1544211#file1544211line1454>
> >
> >     Looks like you forgot to close the quote on the last line. Can you put quotes
on the same line? It's less likely we forget to close this way:
> >     
> >     ```
> >           return Error(
> >               "A reserve operation was attempted for role"
> >               " '" + role.get() + "', but there is a reserved resource"
> >               " in the request with role '" + resource.role() + "'");
> >     ```

Good catch! I updated the error message and made sure to close the quotes.


> On Nov. 3, 2016, 10:39 p.m., Benjamin Mahler wrote:
> > src/tests/master_validation_tests.cpp, lines 207-218
> > <https://reviews.apache.org/r/52642/diff/2/?file=1544212#file1544212line207>
> >
> >     Hm.. it's too bad this test wasn't doing what its comment said, otherwise we'd
have found this earlier :)
> >     
> >     Just a note, I find the following a bit clearer for the validation assertions:
> >     
> >     ```
> >     Option<Error> error = operation::validate(...);
> >     
> >     EXPECT_SOME(error);
> >     ```
> >     
> >     But since all of the tests don't use this pattern right now, it would be better
to do a sweep.

I agree and will post a patch with the sweeping change.


> On Nov. 3, 2016, 10:39 p.m., Benjamin Mahler wrote:
> > src/tests/master_validation_tests.cpp, line 343
> > <https://reviews.apache.org/r/52642/diff/2/?file=1544212#file1544212line343>
> >
> >     Shouldn't we be checking that a framework can't remove a reservation for a role
that doesn't match the framework's role? This technically shouldn't happen because we wouldn't
have offered the resources to the framework, but this unfortunately requires some "non-local
reasoning" to figure out why we don't have to check it.

I'm creating a new RR with my new test. I'll add a test for the unreserve operation to that
RR.


- Gastón


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


On Nov. 4, 2016, 12:50 p.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52642/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 12:50 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Michael Park.
> 
> 
> Bugs: MESOS-6142
>     https://issues.apache.org/jira/browse/MESOS-6142
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Don't allow a reservation if the framework role doesn't match the role
> of all the resources.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp 2f275f6c78b92e13bd7d38043b581b5a3555ee40 
>   src/master/master.cpp 013bb592ba47b785c552e199633e4784e8aa71b1 
>   src/master/validation.hpp 035f721c610ae566c89a1cf0e65ff0df11679f15 
>   src/master/validation.cpp f690a9eacd278b51a52f5588dbeea377df074435 
>   src/tests/master_validation_tests.cpp a5d8610bd61822cdf55cbc8d7056e5cf8fecfa54 
> 
> Diff: https://reviews.apache.org/r/52642/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message