mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 65683: Updated discard handling in `Docker::inspect()`.
Date Thu, 01 Mar 2018 00:07:23 GMT

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

(Updated March 1, 2018, 12:07 a.m.)


Review request for mesos, Andrei Budnik, Gilbert Song, Michael Park, and Vinod Kone.


Changes
-------

Added a missing CHECK guard.


Summary (updated)
-----------------

Updated discard handling in `Docker::inspect()`.


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


Repository: mesos


Description (updated)
-------

Previously, discards of the `Future` returned by `Docker::inspect()`
were only handled at the beginning of each asynchronous continuation
in the library function's call chain. This meant that if a Docker
CLI command became stuck in between async calls, discarding the
`Future` would have no effect.

This patch adds an `onDiscard` callback to the `Future` to ensure
that any discards have the desired effect: cleanup of any spawned
subprocess, and a transition of the `Future` to the discarded state.

Since the Docker library is not a libprocess process, we must
implement this with a `shared_ptr` and a mutex, to protect against
concurrent access to the `onDiscard` callback, which must be updated
when retries are performed.


Diffs (updated)
-----

  src/docker/docker.hpp 0116ca8f28303905d80cd6b3a33a7a7feacc8f8a 
  src/docker/docker.cpp f7a4466292fcedd7e97740698475da2c616ca1d0 


Diff: https://reviews.apache.org/r/65683/diff/9/

Changes: https://reviews.apache.org/r/65683/diff/8-9/


Testing (updated)
-------

sudo bin/mesos-tests.sh --gtest_filter="*DOCKER*"


Thanks,

Greg Mann


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