mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhq527...@gmail.com>
Subject Re: Review Request 54650: Added validation for roles in ACCEPT call.
Date Mon, 12 Dec 2016 13:41:58 GMT

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




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

    I do not think you need this comment. You may see the same comment in this file, but that
is because we will try the `offerId` as an offer first, and then try it as an inverse offer.
I do think that is the case in this method.



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

    I would suggest to change to:
    ```
    return Error("Offer " + stringify(offerId) + " is no longer valid");
    ```



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

    Suggest to change to:
    ```
    if (role.isNone()) {
      role = _role.get();
    }
    
    if (_role.get() != role.get()) {
      return Error("...");
    }
    
    ```
    Similar with what we did in `validateSlave()`.



src/master/validation.cpp (lines 1425 - 1426)
<https://reviews.apache.org/r/54650/#comment229667>

    Suggest to change to:
    ```
    return Error("Offers for different roles in offer list);
    ```
    Similar with the error message in `validateUniqueOfferID()`.


- Qian Zhang


On Dec. 12, 2016, 4:42 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, 4:42 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