> On Dec. 21, 2015, 7:46 a.m., Michael Park wrote: > > src/master/http.cpp, line 1001 > > <https://reviews.apache.org/r/41472/diff/1/?file=1167118#file1167118line1001> > > > > We actually don't need this `if` statement. Although the `role` field > > is marked `optional`, we "fill it in" with the default value of `"*"` if > > unspecified by simply calling `role()`. `roleWhitelist` always has `"*"`. > > > > > > https://github.com/apache/mesos/blob/master/src/master/master.cpp#L564-L565
But MPark, isn't it invalid to try to reserve resources for `*`? I thought each resource in the reserve operation was supposed to have a non-default role set. If so, we should either error here for a missing role, or ignore it here and error in operation::validate(), where we'd anyway need to validate for an explicit `*` (since it would pass the `has_role && isWhitelistedRole` test). Doesn't look like the current operation::validate checks that. Seems like a separate issue/patch though. - Adam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41472/#review111483 ----------------------------------------------------------- On Dec. 16, 2015, 2:48 p.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41472/ > ----------------------------------------------------------- > > (Updated Dec. 16, 2015, 2:48 p.m.) > > > Review request for mesos, Adam B and Michael Park. > > > Bugs: MESOS-4143 > https://issues.apache.org/jira/browse/MESOS-4143 > > > Repository: mesos > > > Description > ------- > > Also added a test that dynamic reservations via the "/reserve" endpoint are > allowed when using implicit roles. > > > Diffs > ----- > > src/master/http.cpp 8dfd67f7d51b8395953d6beb77b2d71bc538eacd > src/tests/reservation_endpoints_tests.cpp > b8edd6fafedd4c2221a8d19c1ebc71254071a8c7 > > Diff: https://reviews.apache.org/r/41472/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Neil Conway > >