Fixed an issue that caused provisioned filesystems specified in --default_container_info to be not recovered.
Review: https://reviews.apache.org/r/38241 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d84524a2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d84524a2 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d84524a2 Branch: refs/heads/master Commit: d84524a2b8eb38977d0d80fa8a789a897eada01d Parents: 3b2d929 Author: Jiang Yan Xu <[email protected]> Authored: Wed Sep 9 16:42:33 2015 -0700 Committer: Jiang Yan Xu <[email protected]> Committed: Thu Sep 10 11:31:43 2015 -0700 ---------------------------------------------------------------------- src/slave/containerizer/provisioners/appc/provisioner.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d84524a2/src/slave/containerizer/provisioners/appc/provisioner.cpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/provisioners/appc/provisioner.cpp b/src/slave/containerizer/provisioners/appc/provisioner.cpp index aa4db48..e177e3c 100644 --- a/src/slave/containerizer/provisioners/appc/provisioner.cpp +++ b/src/slave/containerizer/provisioners/appc/provisioner.cpp @@ -208,12 +208,8 @@ Future<Nothing> AppcProvisionerProcess::recover( // Register living containers, including the ones that do not // provision Appc images. hashset<ContainerID> alive; - foreach (const ContainerState& state, states) { - if (state.executor_info().has_container() && - state.executor_info().container().type() == ContainerInfo::MESOS) { - alive.insert(state.container_id()); - } + alive.insert(state.container_id()); } // List provisioned containers; recover living ones; destroy unknown orphans. @@ -272,7 +268,8 @@ Future<Nothing> AppcProvisionerProcess::recover( } foreachvalue (const string& rootfs, rootfses.get()[backend]) { - VLOG(1) << "Destroying orphan rootfs " << rootfs; + LOG(INFO) << "Destroying unknown orphan rootfs '" << rootfs + << "' of container " << containerId; // Not waiting for the destruction and we don't care about // the return value.
