----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55462/#review165056 -----------------------------------------------------------
src/master/validation.cpp (lines 1623 - 1630) <https://reviews.apache.org/r/55462/#comment236901> Just to clarify, this is an invariant in that if this fails it is a programming error in the master, right? It seems to me we have two invariants here: (1) Coming from framework: framework info is set and resources are allocated (master enforces this when applying operations). (2) Coming from operator: framework info is not set and resources are unallocated (master doesn't enforce this). We should clarify this. Also, `!resource.allocation_info().has_role()` is sufficient here if you want to be more succinct. src/master/validation.cpp (lines 1632 - 1634) <https://reviews.apache.org/r/55462/#comment236903> Shouldn't we also be checking that the allocation role matches the reservation role? src/master/validation.cpp (line 1633) <https://reviews.apache.org/r/55462/#comment236897> Hm.. this case seems to warrant a different message? - Benjamin Mahler On Feb. 8, 2017, 11:41 a.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55462/ > ----------------------------------------------------------- > > (Updated Feb. 8, 2017, 11:41 a.m.) > > > Review request for mesos, Benjamin Mahler, Jay Guo, and Guangya Liu. > > > Bugs: MESOS-6730 > https://issues.apache.org/jira/browse/MESOS-6730 > > > Repository: mesos > > > Description > ------- > > This change introduces validation of the 'AllocationInfo' of resources > used in reservations. > > > Diffs > ----- > > src/master/validation.cpp 37d171512ee54f260aabb6e1071739bcc3769fb0 > > Diff: https://reviews.apache.org/r/55462/diff/ > > > Testing > ------- > > N/A yet. > > > Thanks, > > Benjamin Bannier > >
