mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaus Ma" <klaus1982...@gmail.com>
Subject Re: Review Request 35711: Disallow special characters in role name.
Date Mon, 11 Jan 2016 01:49:41 GMT


> On Jan. 10, 2016, 3:44 p.m., Klaus Ma wrote:
> > src/common/roles.cpp, line 34
> > <https://reviews.apache.org/r/35711/diff/22/?file=1189198#file1189198line34>
> >
> >     Do we need to check whether duplicated roles here?
> 
> Adam B wrote:
>     Not necessary here, since they're de-duped when inserted into the hashmap in master.cpp.
>     Please also note that the roleWhitelist (`--roles`) is deprecating, and this function
will be removed with it.

Yes, but I'd suggest to log a warning messoage for cluster admin; for example, if Operator
set duplidated role by mistake, it's hard for him to identify where is the issue.


> On Jan. 10, 2016, 3:44 p.m., Klaus Ma wrote:
> > src/common/roles.cpp, lines 56-63
> > <https://reviews.apache.org/r/35711/diff/22/?file=1189198#file1189198line56>
> >
> >     Just another question about the role: do we support other language, e.g. Chinese?
If not, I'd suggest also to highlight in document.
> 
> Adam B wrote:
>     Good question. We're also likely have different requirements for other OS's like
Windows or BSD. But all we really care about from a technical perspective is that the role
name can be used to create a valid directory name on any agent. Remember that roles are set/validated
on the master, but the agents are where we're creating per-role checkpoint directories, and
each agent could have a different OS/locale. We really need a subset that satisfies all OS/locale
constraints. Maybe this should be pulled out into a stout:: method (could be done as a follow-up
patch).
> 
> haosdent huang wrote:
>     yes, I also use isspace in the init patch. But because we also don't allow control
characters, I change to use current way. http://en.cppreference.com/w/cpp/string/byte/isspace

Agree with Adam to pulled this part out into `stout`; that'll be helpful for us to support
multiple OS/locale.


- Klaus


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35711/#review113639
-----------------------------------------------------------


On Jan. 9, 2016, 7:15 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35711/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2016, 7:15 p.m.)
> 
> 
> Review request for mesos, Adam B, Jie Yu, and Michael Park.
> 
> 
> Bugs: MESOS-2210
>     https://issues.apache.org/jira/browse/MESOS-2210
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Disallow special characters in role name.
> 
> 
> Diffs
> -----
> 
>   docs/roles.md af1adad7ec8122fd10f7de44848014b850416bcd 
>   include/mesos/roles.hpp PRE-CREATION 
>   src/Makefile.am bbd0c119321fa9d11fea61b140428dd92d1258c8 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/common/roles.cpp PRE-CREATION 
>   src/master/master.cpp 2d9b7f9540574aa3ef9e5af3b2b8922dffeebac8 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/tests/role_tests.cpp 373ae267b85588fe491ab0a0ce8aa195f971aac3 
> 
> Diff: https://reviews.apache.org/r/35711/diff/
> 
> 
> Testing
> -------
> 
> make -j8 check
> 
> 
> Thanks,
> 
> haosdent huang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message