> On June 24, 2015, 9:30 a.m., Adam B wrote: > > Looks great! We recently added validation lambdas to flag definitions, so > > you may be able to take advantage of that. > > We probably also want to do validation in the slave for the --resources > > flag, since resources can be declared as reserved for particular roles, and > > reserving a resource for an invalid role would be bad. I don't know if we > > even validate the reservation roles as known roles in the master upon slave > > registration. The only difference with --resources is that resources can > > use `*` to declare resources as unreserved.
I check the "Master::registerSlave", master don't check reservation roles. So I add this check to `src/slave/flags.cpp`. - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35711/#review89140 ----------------------------------------------------------- On June 27, 2015, 8:36 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35711/ > ----------------------------------------------------------- > > (Updated June 27, 2015, 8:36 a.m.) > > > Review request for mesos, Adam B and Jie Yu. > > > Bugs: MESOS-2210 > https://issues.apache.org/jira/browse/MESOS-2210 > > > Repository: mesos > > > Description > ------- > > Disallow special characters in role name. > > > Diffs > ----- > > src/master/flags.cpp 4377715029878cfee36f067e9c53c42b522b79d8 > src/master/master.hpp af83d3e82d2c161b3cc4583e78a8cbbd2f9a4064 > src/master/validation.hpp 469d6f56c3de28a34177124aae81ce24cb4ad160 > src/master/validation.cpp 9d128aa1b349b018b8e4a1916434d848761ca051 > > Diff: https://reviews.apache.org/r/35711/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
