You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2016/11/29 05:35:44 UTC

Re: Review Request 54062: Added logic to validate FrameworkInfo roles.

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




src/master/master.cpp (lines 7013 - 7021)
<https://reviews.apache.org/r/54062/#comment227659>

    You may want to create a follow up patch to handle a framework with multiple roles here.


- Guangya Liu


On \u5341\u4e00\u6708 27, 2016, 4:12 p.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54062/
> -----------------------------------------------------------
> 
> (Updated \u5341\u4e00\u6708 27, 2016, 4:12 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, 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   |
> |-------|-------|---------|
> 
> One test case is added to ensure validateRoles() catches invalid
> combination of these attributes. Another three test cases are added
> to ensure the master accepts/rejects subscription given valid/invalid
> multiple 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
> 
>


Re: Review Request 54062: Introduced validateRoles method for FrameworkInfo.

Posted by Jay Guo <gu...@cn.ibm.com>.

> On Nov. 29, 2016, 5:35 a.m., Guangya Liu wrote:
> > src/master/master.cpp, lines 7013-7021
> > <https://reviews.apache.org/r/54062/diff/5/?file=1570862#file1570862line7013>
> >
> >     You may want to create a follow up patch to handle a framework with multiple roles here.

will handle this in follow up patches.


- Jay


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


On Dec. 2, 2016, 8:44 a.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54062/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 8:44 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Guangya Liu, and Qiang Zhang.
> 
> 
> Bugs: MESOS-6629
>     https://issues.apache.org/jira/browse/MESOS-6629
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Roles should not contain duplicate entries. Also, we need to validate
> that 'role', 'roles' and MULTI_ROLE capability are set properly. They
> are checked against 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   |
> +-------+-------+---------+
> 
> 
> Diffs
> -----
> 
>   src/master/validation.hpp b8389460f34b3531f2b6ff93f18f496c01e1a079 
>   src/master/validation.cpp 42d9b4a8784c2a161b74d7b46619cc22272e14e3 
> 
> Diff: https://reviews.apache.org/r/54062/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jay Guo
> 
>