----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54062/#review156890 -----------------------------------------------------------
src/master/master.cpp (line 2336) <https://reviews.apache.org/r/54062/#comment227247> We shoudl also make sure `isWhitelistedRole` can cover the multiple role case. src/master/validation.hpp (line 57) <https://reviews.apache.org/r/54062/#comment227262> I think we do not need to put `validate` to `internal` for now, but may need to add some new functions in future if needed, such as `validateRoles()` etc. src/master/validation.hpp (line 59) <https://reviews.apache.org/r/54062/#comment227248> kill this src/master/validation.hpp (line 83) <https://reviews.apache.org/r/54062/#comment227249> kill this src/master/validation.hpp (line 84) <https://reviews.apache.org/r/54062/#comment227250> I'd prefer we name it as `validate()` here to keep consistent, also we may need to validate other fields for `framework` in the future. src/master/validation.cpp (line 252) <https://reviews.apache.org/r/54062/#comment227263> we do not need period for those error message in the end, please kill all of the period for those error messages. src/tests/master_validation_tests.cpp (line 2389) <https://reviews.apache.org/r/54062/#comment227264> We usally use a full name, it is difficult to understand what `Cap` means. ``` TEST_F(FrameworkValidationTest, RejectFrameworkWithRolesWithoutMultipleRoleCapability) ``` - Guangya Liu On 十一月 25, 2016, 6:45 a.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54062/ > ----------------------------------------------------------- > > (Updated 十一月 25, 2016, 6:45 a.m.) > > > Review request for mesos, Guangya Liu and Qiang Zhang. > > > Bugs: MESOS-6629 > https://issues.apache.org/jira/browse/MESOS-6629 > > > Repository: mesos > > > Description > ------- > > We need to do necessary validation for the conflicts of role, roles > and MULTI_ROLE capability. It complies with following matrix: > > -- MULTI_ROLE is NOT set - > |-------|---------| > |Roles |No Roles | > |-------|-------|---------| > |Role | Error | None | > |-------|-------|---------| > |No Role| Error | None | > |-------|-------|---------| > > --- MULTI_ROLE is set ---- > |-------|---------| > |Roles |No Roles | > |-------|-------|---------| > |Role | Error | Error | > |-------|-------|---------| > |No Role| None | None | > |-------|-------|---------| > > Two test cases are added, one is for validateRoles method and another > ensures that the master rejects subscription when provided invalid > roles. > > > Diffs > ----- > > src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a > src/master/validation.hpp b8389460f34b3531f2b6ff93f18f496c01e1a079 > src/master/validation.cpp 42d9b4a8784c2a161b74d7b46619cc22272e14e3 > src/tests/master_validation_tests.cpp > f893067859425967654401f3226149268b51cf57 > > Diff: https://reviews.apache.org/r/54062/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jay Guo > >