From reviews-return-19716-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Sun Jan 10 18:45:13 2016 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE4EF1815E for ; Sun, 10 Jan 2016 18:45:13 +0000 (UTC) Received: (qmail 54417 invoked by uid 500); 10 Jan 2016 18:45:13 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 54392 invoked by uid 500); 10 Jan 2016 18:45:13 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 54373 invoked by uid 99); 10 Jan 2016 18:45:13 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jan 2016 18:45:13 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 160742802F7; Sun, 10 Jan 2016 18:45:13 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8719665931105062615==" MIME-Version: 1.0 Subject: Re: Review Request 35711: Disallow special characters in role name. From: "haosdent huang" To: "Adam B" , "Jie Yu" , "Michael Park" Cc: "haosdent huang" , "mesos" , "Klaus Ma" Date: Sun, 10 Jan 2016 18:45:13 -0000 Message-ID: <20160110184513.26793.67925@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "haosdent huang" X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/35711/ X-Sender: "haosdent huang" References: <20160110074426.26792.6203@reviews.apache.org> In-Reply-To: <20160110074426.26792.6203@reviews.apache.org> Reply-To: "haosdent huang" X-ReviewRequest-Repository: mesos --===============8719665931105062615== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Jan. 10, 2016, 7:44 a.m., Klaus Ma wrote: > > src/common/roles.cpp, lines 56-63 > > > > > > 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). 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 - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35711/#review113639 ----------------------------------------------------------- On Jan. 9, 2016, 11:15 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35711/ > ----------------------------------------------------------- > > (Updated Jan. 9, 2016, 11:15 a.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 > > --===============8719665931105062615==--