----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55271/#review162878 -----------------------------------------------------------
Fix it, then Ship it! src/master/master.hpp (lines 2490 - 2504) <https://reviews.apache.org/r/55271/#comment234245> What do you think about pulling the roles retrieval out? ```cpp auto getRoles = [](const FrameworkInfo& info) -> std::set<std::string> { if (protobuf::frameworkHasCapability( info, FrameworkInfo::Capability::MULTI_ROLE)) { return {info.roles().begin(), info.roles().end())}; } else { return {info.role()}; } }; if (getRoles(info) != getRoles(source)) { return Error(...); } ``` src/master/master.hpp (lines 2531 - 2535) <https://reviews.apache.org/r/55271/#comment234247> What do you think about putting this as the `else` condition for ```cpp if (protobuf::frameworkHasCapability( info, FrameworkInfo::Capability::MULTI_ROLE) || protobuf::frameworkHasCapability( source, FrameworkInfo::Capability::MULTI_ROLE)) ``` as opposed to spelling out the opposite condition? - Michael Park On Jan. 23, 2017, midnight, Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55271/ > ----------------------------------------------------------- > > (Updated Jan. 23, 2017, midnight) > > > Review request for mesos, Benjamin Mahler, Jay Guo, Guangya Liu, and Michael > Park. > > > Bugs: MESOS-6631 > https://issues.apache.org/jira/browse/MESOS-6631 > > > Repository: mesos > > > Description > ------- > > We currently do not allow `MULTI_ROLE` frameworks to change their > roles. This restriction will be lifted later. > > > Diffs > ----- > > src/master/master.hpp 8e8a9037af11cf95961b6498540a0fd486ed091b > src/tests/master_validation_tests.cpp > a63178139a5283d6a3fcbe60c271dab1914e5da9 > > Diff: https://reviews.apache.org/r/55271/diff/ > > > Testing > ------- > > Tested on various Linux configurations in internal CI. > > > Thanks, > > Benjamin Bannier > >
