[ 
https://issues.apache.org/jira/browse/MESOS-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15821172#comment-15821172
 ] 

Benjamin Bannier commented on MESOS-6730:
-----------------------------------------

Reviews:

https://reviews.apache.org/r/55461/
https://reviews.apache.org/r/55462/ (WIP)

> Reserve operation should validate reserved resource role against resource 
> allocationInfo role
> ---------------------------------------------------------------------------------------------
>
>                 Key: MESOS-6730
>                 URL: https://issues.apache.org/jira/browse/MESOS-6730
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Guangya Liu
>            Assignee: Benjamin Bannier
>
> When doing dynamic reservation validation, the current logic is make sure the 
> reserved resources role is same as the framework role (see 
> [src/master/validation.cpp|https://github.com/apache/mesos/blob/0228fa74c25f450478a6a5a42e1ca384c26db8bd/src/master/validation.cpp#L1539-L1544]):
> {code}
>   if (frameworkRole.isSome() && resource.role() != frameworkRole.get()) {
>       return Error(
>           "A reserve operation was attempted for a resource with role"
>           " '" + resource.role() + "', but the framework can only reserve"
>           " resources with role '" + frameworkRole.get() + "'");
>     }
> {code}
> With multi-role framework, we should validate reserved resource role same as 
> resource allocation role.
> Please make sure distinguish dynamic reservation with framework and http 
> endpoint. If dynamic reservation was triggered by a framework, then we need 
> to do such validation. If done by the http endpoint, then no need to validate 
> the roles.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to