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 70923: Added a registry operation for the DRAIN_AGENT call.
Date Fri, 28 Jun 2019 18:39:58 GMT

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




src/master/registry_operations.cpp
Lines 387-403 (patched)
<https://reviews.apache.org/r/70923/#comment303356>

    This also came up in the quota changes, my comment from there:
    
    --
    
    Let's pull something out for this, since it's going to come up again.
    
    E.g.
    
    ```
    protobuf::master::Capabilities capabilities = registry->minimum_capabilities();
    
    capabilities.agentDraining = true;
    
    *registry->mutable_minimum_capabilities() = capabilities.toStrings();
    ```
    
    For this to work, we have to:
    
    -Update protobuf::master::Capabilities to take in repeated strings (in addition to the
existing repeated proto constructor)
    -Carry the unknown capabilities as a member of protobuf::master::Capabilities (we can
just tackle the strings for now and leave the existing TODO on the protobuf constructor)
    -Add a toStrings() that goes back to repeated string
    
    This will make this logic very simple and easy to read, and leave very little room for
error across any operations that modify the minimum capabilities. We can also unit test the
C++ wrapper to make sure it's correct!


- Benjamin Mahler


On June 26, 2019, 8:44 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70923/
> -----------------------------------------------------------
> 
> (Updated June 26, 2019, 8:44 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-9814
>     https://issues.apache.org/jira/browse/MESOS-9814
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds the associated registry operation and fields for the
> DRAIN_AGENT master call.  This call affects admitted or unreachable
> agents, but this commit only deals with admitted agents.
>     
> Because this feature is not downgrade compatible, a minimum capability
> is added when the draining feature is used.
> 
> 
> Diffs
> -----
> 
>   src/master/registry.proto 239789322c45c6a8346332f50661a98b1851b685 
>   src/master/registry_operations.hpp 5a3010d46c4eddb0d660eb7368ec836903477a9b 
>   src/master/registry_operations.cpp c417c4d6c4272eeab15f5313ca5160d4a0aa4da4 
>   src/tests/registrar_tests.cpp 81979d78f1348791e28f1afea4ca2999de6362b8 
> 
> 
> Diff: https://reviews.apache.org/r/70923/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


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