Destroyed nested container on `attachContainerOutput` failure.
authorAndrei Budnik <abudnik@mesosphere.com>
Tue, 13 Feb 2018 18:53:30 +0000 (10:53 -0800)
committerGreg Mann <gregorywmann@gmail.com>
Tue, 13 Feb 2018 20:10:08 +0000 (12:10 -0800)
commite5dc6dabbe736ed0fa3005b61817364ae5f49eef
treeab54780ef209e03183d2f641857e2b77242d627c
parent547f5ec9a510a74cd18a8af26884d268e9893982
Destroyed nested container on `attachContainerOutput` failure.

After launching a container, the `LAUNCH_NESTED_CONTAINER_SESSION`
handler calls into `attachContainerOutput()`. Previously, if
`attachContainerOutput()` returned an HTTP response code other than
200, we didn't destroy the nested container. From the point of view of
API users, if `LAUNCH_NESTED_CONTAINER_SESSION` returns an error, then
no nested container should be left in the `RUNNING` state. This patch
fixes this issue by destroying the nested container when HTTP errors
are returned by this call to `attachContainerOutput()`.

Review: https://reviews.apache.org/r/65637/
src/slave/http.cpp