You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2019/07/03 17:23:03 UTC

Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

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

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 logic in the master to detect when a DRAINING agent can
be transitioned into a DRAINED state.  When this happens, the new
state is checkpointed into the registry and, if the agent is to be
marked "gone", the master will remove the agent.


Diffs
-----

  src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
  src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 


Diff: https://reviews.apache.org/r/71008/diff/1/


Testing
-------

TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.


Thanks,

Joseph Wu


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Benjamin Bannier <bb...@apache.org>.

> On July 15, 2019, 11:14 a.m., Benjamin Bannier wrote:
> > src/master/master.cpp
> > Lines 6255-6260 (patched)
> > <https://reviews.apache.org/r/71008/diff/4/?file=2154545#file2154545line6255>
> >
> >     It seems we only do this check to make sure we can access the config below which introduces quite some coupling. Is there a reason we couldn't grab the config outside the lambda and capture it instead (i.e., do we want to support mutable drain configs)? That would allow us to reduce coupling between `Slave::draining` and `markGone`.
> 
> Joseph Wu wrote:
>     This check is specifically to guard against an interleaving of the `RemoveSlave` and `MarkAgentDrained` registry operations.  There are a variety of ways to trigger the `RemoveSlave`, one of which is shutting down the agent (SIGUSR1).
>     
>     So imagine the following sequence of events:
>     1) Agent sends the master a `UnregisterSlaveMessage`.
>     2) Master starts the `RemoveSlave` operation.
>     3) Final terminal ACK arrives at the master, which causes master to call `checkAndTransitionDrainingAgent` and `MarkAgentDrained`.
>     4) `RemoveSlave` completes.  Master clears memory of that agent.
>     5) `MarkAgentDrained` completes.  Master no longer knows about that agent and hits this LOG line.

That chain of event seems pretty clear, but I was after something else: right now we seem to perform this check here just so we can access the config; `markGone` asserts that `slaves.markingGone.contains(slaveId)` while we here ensure `slaves.draining.contains(slaveId)`. That seems like unnecessary and complicated coupling to me which I'd prefer we wouldn't introduce.

In order to remove the need for checking `slaves.draining` we could capture the drain config by value into the closure (which would effectively require that drain configs are immutable) and would then invoke `markGone` regardless on whether an agent is in `slaves.draining`. For your point (5) we should instead perform a precondition check with something more closely related, e.g., check whether the agent is present in `slaves.markingGone`.


- Benjamin


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


On July 15, 2019, 8:19 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 15, 2019, 8:19 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
>   src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/5/
> 
> 
> Testing
> -------
> 
> See: https://reviews.apache.org/r/71069/
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Greg Mann <gr...@mesosphere.io>.

> On July 15, 2019, 9:14 a.m., Benjamin Bannier wrote:
> > src/master/master.cpp
> > Lines 6255-6260 (patched)
> > <https://reviews.apache.org/r/71008/diff/4/?file=2154545#file2154545line6255>
> >
> >     It seems we only do this check to make sure we can access the config below which introduces quite some coupling. Is there a reason we couldn't grab the config outside the lambda and capture it instead (i.e., do we want to support mutable drain configs)? That would allow us to reduce coupling between `Slave::draining` and `markGone`.
> 
> Joseph Wu wrote:
>     This check is specifically to guard against an interleaving of the `RemoveSlave` and `MarkAgentDrained` registry operations.  There are a variety of ways to trigger the `RemoveSlave`, one of which is shutting down the agent (SIGUSR1).
>     
>     So imagine the following sequence of events:
>     1) Agent sends the master a `UnregisterSlaveMessage`.
>     2) Master starts the `RemoveSlave` operation.
>     3) Final terminal ACK arrives at the master, which causes master to call `checkAndTransitionDrainingAgent` and `MarkAgentDrained`.
>     4) `RemoveSlave` completes.  Master clears memory of that agent.
>     5) `MarkAgentDrained` completes.  Master no longer knows about that agent and hits this LOG line.
> 
> Benjamin Bannier wrote:
>     That chain of event seems pretty clear, but I was after something else: right now we seem to perform this check here just so we can access the config; `markGone` asserts that `slaves.markingGone.contains(slaveId)` while we here ensure `slaves.draining.contains(slaveId)`. That seems like unnecessary and complicated coupling to me which I'd prefer we wouldn't introduce.
>     
>     In order to remove the need for checking `slaves.draining` we could capture the drain config by value into the closure (which would effectively require that drain configs are immutable) and would then invoke `markGone` regardless on whether an agent is in `slaves.draining`. For your point (5) we should instead perform a precondition check with something more closely related, e.g., check whether the agent is present in `slaves.markingGone`.

The `Master::markGone()` function is currently called by the `Master::_markAgentGone()` handler, which ensures that the agent exists, then checkpoints to the registry, then unconditionally calls into `Master::markGone()`. It looks like the only requirement of `Master::markGone()` is that the agent is present in `master->slaves.markingGone`. So, I think as long as we add the agent to `slaves.markingGone` before persisting to the registry, it's fine to capture the `markGone` bit in the lambda and call into `Master::markGone()` whether or not the agent has been removed in the interim. And actually, if we add the agent to `slaves.markingGone`, then the `UnregisterSlaveMessage` code path would not succeed in removing that agent, since it checks the contents of `slaves.markingGone`.


- Greg


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


On July 15, 2019, 6:19 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 15, 2019, 6:19 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
>   src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/5/
> 
> 
> Testing
> -------
> 
> See: https://reviews.apache.org/r/71069/
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On July 15, 2019, 2:14 a.m., Benjamin Bannier wrote:
> > src/master/master.cpp
> > Lines 6255-6260 (patched)
> > <https://reviews.apache.org/r/71008/diff/4/?file=2154545#file2154545line6255>
> >
> >     It seems we only do this check to make sure we can access the config below which introduces quite some coupling. Is there a reason we couldn't grab the config outside the lambda and capture it instead (i.e., do we want to support mutable drain configs)? That would allow us to reduce coupling between `Slave::draining` and `markGone`.

This check is specifically to guard against an interleaving of the `RemoveSlave` and `MarkAgentDrained` registry operations.  There are a variety of ways to trigger the `RemoveSlave`, one of which is shutting down the agent (SIGUSR1).

So imagine the following sequence of events:
1) Agent sends the master a `UnregisterSlaveMessage`.
2) Master starts the `RemoveSlave` operation.
3) Final terminal ACK arrives at the master, which causes master to call `checkAndTransitionDrainingAgent` and `MarkAgentDrained`.
4) `RemoveSlave` completes.  Master clears memory of that agent.
5) `MarkAgentDrained` completes.  Master no longer knows about that agent and hits this LOG line.


- Joseph


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


On July 11, 2019, 4:01 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 11, 2019, 4:01 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp b42ebb953e0510e83ec6bd041cbddbeb8f60067c 
>   src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/4/
> 
> 
> Testing
> -------
> 
> TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Benjamin Bannier <bb...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/#review216605
-----------------------------------------------------------




src/master/master.cpp
Lines 6238-6241 (patched)
<https://reviews.apache.org/r/71008/#comment303814>

    I feel it would make sense to log here (e.g., "Agent foobar is still draining"). We would hit the previous `if` even for any agent update while this one here would only be hit for draining agents (so we'd care about that additional bit of information).



src/master/master.cpp
Lines 6255-6260 (patched)
<https://reviews.apache.org/r/71008/#comment303813>

    It seems we only do this check to make sure we can access the config below which introduces quite some coupling. Is there a reason we couldn't grab the config outside the lambda and capture it instead (i.e., do we want to support mutable drain configs)? That would allow us to reduce coupling between `Slave::draining` and `markGone`.



src/master/master.cpp
Lines 6269 (patched)
<https://reviews.apache.org/r/71008/#comment303815>

    It would be nice to log here so we are able to see when draining is done.


- Benjamin Bannier


On July 12, 2019, 1:01 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 12, 2019, 1:01 a.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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp b42ebb953e0510e83ec6bd041cbddbeb8f60067c 
>   src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/4/
> 
> 
> Testing
> -------
> 
> TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/#review216626
-----------------------------------------------------------




src/master/master.cpp
Lines 6271 (patched)
<https://reviews.apache.org/r/71008/#comment303836>

    Hmm.. won't this violate the check in `Master::markGone()`:
    ```
    CHECK(slaves.markingGone.contains(slaveId));
    ```


- Greg Mann


On July 15, 2019, 6:19 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 15, 2019, 6:19 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
>   src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/5/
> 
> 
> Testing
> -------
> 
> See: https://reviews.apache.org/r/71069/
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/#review216664
-----------------------------------------------------------


Ship it!




Ship It!

- Greg Mann


On July 15, 2019, 11:31 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 15, 2019, 11:31 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
>   src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/6/
> 
> 
> Testing
> -------
> 
> See: https://reviews.apache.org/r/71069/
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/
-----------------------------------------------------------

(Updated July 15, 2019, 4:31 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Properly handled marking an agent gone after draining.


Bugs: MESOS-9814
    https://issues.apache.org/jira/browse/MESOS-9814


Repository: mesos


Description
-------

This adds logic in the master to detect when a DRAINING agent can
be transitioned into a DRAINED state.  When this happens, the new
state is checkpointed into the registry and, if the agent is to be
marked "gone", the master will remove the agent.


Diffs (updated)
-----

  src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
  src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
  src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 


Diff: https://reviews.apache.org/r/71008/diff/6/

Changes: https://reviews.apache.org/r/71008/diff/5-6/


Testing
-------

See: https://reviews.apache.org/r/71069/


Thanks,

Joseph Wu


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/
-----------------------------------------------------------

(Updated July 15, 2019, 11:19 a.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Added some log lines.


Bugs: MESOS-9814
    https://issues.apache.org/jira/browse/MESOS-9814


Repository: mesos


Description
-------

This adds logic in the master to detect when a DRAINING agent can
be transitioned into a DRAINED state.  When this happens, the new
state is checkpointed into the registry and, if the agent is to be
marked "gone", the master will remove the agent.


Diffs (updated)
-----

  src/master/http.cpp cd0f40cb7b966d6620e3fb49d4c08807185c9101 
  src/master/master.hpp e8def83fe9bcee19772df9a9764852bc694c5247 
  src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 


Diff: https://reviews.apache.org/r/71008/diff/5/

Changes: https://reviews.apache.org/r/71008/diff/4-5/


Testing
-------

TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.


Thanks,

Joseph Wu


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/
-----------------------------------------------------------

(Updated July 11, 2019, 4:01 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Fixed two cases where the agent would not be transitioned to DRAINED:

* When an agent is already technically DRAINED before draining.
* When an agent is already technically DRAINED and unreachable, starts draining, and then reregisters.


Bugs: MESOS-9814
    https://issues.apache.org/jira/browse/MESOS-9814


Repository: mesos


Description
-------

This adds logic in the master to detect when a DRAINING agent can
be transitioned into a DRAINED state.  When this happens, the new
state is checkpointed into the registry and, if the agent is to be
marked "gone", the master will remove the agent.


Diffs (updated)
-----

  src/master/http.cpp b42ebb953e0510e83ec6bd041cbddbeb8f60067c 
  src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
  src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 


Diff: https://reviews.apache.org/r/71008/diff/4/

Changes: https://reviews.apache.org/r/71008/diff/3-4/


Testing
-------

TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.


Thanks,

Joseph Wu


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/
-----------------------------------------------------------

(Updated July 9, 2019, 12:29 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Style nits.


Bugs: MESOS-9814
    https://issues.apache.org/jira/browse/MESOS-9814


Repository: mesos


Description
-------

This adds logic in the master to detect when a DRAINING agent can
be transitioned into a DRAINED state.  When this happens, the new
state is checkpointed into the registry and, if the agent is to be
marked "gone", the master will remove the agent.


Diffs (updated)
-----

  src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
  src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 


Diff: https://reviews.apache.org/r/71008/diff/3/

Changes: https://reviews.apache.org/r/71008/diff/2-3/


Testing
-------

TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.


Thanks,

Joseph Wu


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/#review216432
-----------------------------------------------------------




src/master/master.cpp
Lines 6238-6240 (patched)
<https://reviews.apache.org/r/71008/#comment303667>

    Nit: I think we usually place the logical operators at the end of the preceding line, rather than the beginning of the next?



src/master/master.cpp
Lines 6251 (patched)
<https://reviews.apache.org/r/71008/#comment303669>

    Newline before `.then`



src/master/master.cpp
Lines 6265 (patched)
<https://reviews.apache.org/r/71008/#comment303670>

    Can we eliminate this temporary variable?


- Greg Mann


On July 3, 2019, 5:23 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 3, 2019, 5:23 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/2/
> 
> 
> Testing
> -------
> 
> TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71008: Implemented transition from DRAINING to DRAINED in master.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71008/#review216445
-----------------------------------------------------------



Patch looks great!

Reviews applied: [70822, 70910, 70911, 70923, 70956, 70957, 70924, 70996, 71008]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On July 3, 2019, 5:23 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71008/
> -----------------------------------------------------------
> 
> (Updated July 3, 2019, 5:23 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 logic in the master to detect when a DRAINING agent can
> be transitioned into a DRAINED state.  When this happens, the new
> state is checkpointed into the registry and, if the agent is to be
> marked "gone", the master will remove the agent.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 23dafe746b6f9b3d70ad7220f54c4d49068b8af8 
>   src/master/master.cpp 5247377c2e7e92b9843dd4c9d28f92ba679ad742 
> 
> 
> Diff: https://reviews.apache.org/r/71008/diff/2/
> 
> 
> Testing
> -------
> 
> TODO: Need to write some unit tests.  I'll want to rebase onto the agent changes so that there is more detectable stuff in the tests.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>