mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <>
Subject Re: Review Request 63063: Modified Containerizer::launch interface to allow repeated launch.
Date Tue, 14 Nov 2017 01:36:46 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Nov. 13, 2017, 5:36 p.m.)

Review request for mesos, Gilbert Song and Jie Yu.


* Fixup some comments in composing containerizer talking about return `false`, which they
don't anymore.
* Add an UNREACHABLE to a switch statement (compiler warning).
* Pull out the docker changes into the next review.

Bugs: MESOS-7305

Repository: mesos


There is some existing tech debt around requiring the caller of
`Containerizer::launch` to call `Containerizer::destroy` if the launch
fails (see MESOS-6214).  For nested and standalone containers, the
side effect of this results in accidentally destroying running
containers if you make the same call an even number of times.

For example, suppose the user launches a valid nested container
with an ID of 'parent.child'. If the user issues the same call to
launch 'parent.child' again, this second call will fail *and* will
also destroy the first container.

This commit prevents repeated launch calls from destroying containers
by changing the return value of `Containerizer::launch`.  There are
now four possible return values:
  * The launch succeeded.
  * The standalone/nested container already exists.
  * The given ContainerConfig is not supported.
  * The launch failed.

Diffs (updated)

  src/slave/containerizer/composing.hpp 06d68eef5de7745e32f0e808f11016bcc285dd8f 
  src/slave/containerizer/composing.cpp 587f009384f0c7ef87482686578dc822d3d5b208 
  src/slave/containerizer/containerizer.hpp 449bb5d0902936faae7bf9bae9c703b219aed842 
  src/slave/containerizer/mesos/containerizer.hpp 6d356ccf82f36df8c6f558fb0ace7d9f982a3d6b

  src/slave/containerizer/mesos/containerizer.cpp 100e3bbda543d87808da9ff6bea42da5099ea8c5

  src/slave/http.cpp 22cdac97e1a8a28ca149043ffa1d0646073d7fdb 
  src/slave/slave.hpp c0acaa639a2bacaa6955ae6c5ab41e75dc1d11f7 
  src/slave/slave.cpp d8bacebc74790e955490a158c37ac0d9e75fd6b5 
  src/tests/agent_container_api_tests.cpp PRE-CREATION 




Requires the next review in the chain (test changes).


Joseph Wu

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