mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 54650: Added validation for roles in ACCEPT call.
Date Tue, 13 Dec 2016 00:40:09 GMT

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




src/master/validation.cpp (lines 1329 - 1337)
<https://reviews.apache.org/r/54650/#comment229778>

    Can you inline this instead of pulling out a function? It would be nice to use compose
together the functions we need:
    
    -> get the offer
    -> handle no offer
    -> get the role
    -> ...
    
    We tend to avoid functions that bundle together independent operations (in this case:
"get the offer, and if the role is available get the role). (Also note that getRole might
be a bit ambiguous in that there are "allocated" roles, and "reservation" roles).



src/master/validation.cpp (line 1425)
<https://reviews.apache.org/r/54650/#comment229779>

    This return here looks incorrect? Maybe copy over a similar comment from validateSlave:
    
    ```
        // Use the first role to validate against the rest.
        if (role.isNone()) {
          role = _role.get();
        }
    ```



src/master/validation.cpp (lines 1428 - 1431)
<https://reviews.apache.org/r/54650/#comment229781>

    Can you make this message similar to the one we use in validateSlave?
    
    ```
    Aggregated offers must be allocated to the same role; Offer <ID1> is allocated to
role 'r1' but another is allocated to role 'r2'
    ```


- Benjamin Mahler


On Dec. 12, 2016, 2:30 p.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54650/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2016, 2:30 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Guangya Liu.
> 
> 
> Bugs: MESOS-6637
>     https://issues.apache.org/jira/browse/MESOS-6637
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> For a multi-role framework, it may receive offers for different roles
> in that framework. However, we disallow multiple offers with different
> roles being accepted in single ACCEPT call.
> 
> 
> Diffs
> -----
> 
>   src/master/validation.cpp 96aa36585ded4bd7cf98526f710ccbc4f23b1f0f 
> 
> Diff: https://reviews.apache.org/r/54650/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jay Guo
> 
>


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