> On Jan. 13, 2017, 4:17 p.m., Jay Guo wrote: > > When a resource with `*` is offered to a multi-role framework, how does the > > framework decide which role to reserve the resource for? > > Benjamin Bannier wrote: > Frameworks with default role cannot reserve resources; this is the first > check in the validation function being updated in this patch.
For example. My framework has role `foo`, `bar` and `*`. I get an offer with resource of role `*`. I want to reserve it for `foo`. Previously I simply issue `RESERVE` operation and the resource will be reserved for the ONLY role I have. But in multi-role scenario, how should I tell which role I want to reserve the resource for? - Jay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55461/#review161489 ----------------------------------------------------------- On Jan. 13, 2017, 11:50 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55461/ > ----------------------------------------------------------- > > (Updated Jan. 13, 2017, 11:50 p.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 updates the resource reservation validation for frameworks which > can have multiple roles. During a deprecation period 'FrameworkInfo' > will have fields for both 'role' and 'roles', however the validation > function works with just an optional set of roles. Here an empty set > captures the previous semantics of either having an empty 'role' field > or 'role' set as '*'. This forces the callers to properly construct a > set of framework roles from the available information. An optional set > is used in order to accommodate callers which have no information > about the framework's roles, and ultimately disables validation taking > that information into account. > > > Diffs > ----- > > src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 > src/master/validation.hpp 57e81779ff7444904c2ad7bad33aaf9167b98d05 > src/master/validation.cpp 96aa36585ded4bd7cf98526f710ccbc4f23b1f0f > src/tests/master_validation_tests.cpp > e5d55e03648cb218d42adc594d6fa7d40ea9bcbb > > Diff: https://reviews.apache.org/r/55461/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Bannier > >
