mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Renamed ContainerPrepareInfo to ContainerLaunchInfo.
Date Fri, 15 Jan 2016 17:33:17 GMT
Repository: mesos
Updated Branches:
  refs/heads/master f2cf6cbb1 -> 331939ff7


Renamed ContainerPrepareInfo to ContainerLaunchInfo.

This better captures the purpose of this struct. ContainerLaunchInfo is
returned by the isolator 'prepare' function. It contains information
about how a container should be launched (e.g., environment variables,
namespaces, commands, etc.). The information will be used by the Mesos
Containerizer when launching the container.

Review: https://reviews.apache.org/r/42331/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/331939ff
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/331939ff
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/331939ff

Branch: refs/heads/master
Commit: 331939ff779ce932e53976d757e8bb3c5354f47a
Parents: f2cf6cb
Author: Gilbert Song <songzihao1990@gmail.com>
Authored: Fri Jan 15 09:08:19 2016 -0800
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Fri Jan 15 09:08:19 2016 -0800

----------------------------------------------------------------------
 include/mesos/slave/isolator.hpp                |   2 +-
 include/mesos/slave/isolator.proto              |   2 +-
 src/slave/containerizer/mesos/containerizer.cpp |  46 +++---
 src/slave/containerizer/mesos/containerizer.hpp |   8 +-
 src/slave/containerizer/mesos/isolator.cpp      |   4 +-
 src/slave/containerizer/mesos/isolator.hpp      |   4 +-
 .../mesos/isolators/cgroups/cpushare.cpp        |   6 +-
 .../mesos/isolators/cgroups/cpushare.hpp        |   2 +-
 .../mesos/isolators/cgroups/mem.cpp             |   6 +-
 .../mesos/isolators/cgroups/mem.hpp             |   2 +-
 .../mesos/isolators/cgroups/perf_event.cpp      |   4 +-
 .../mesos/isolators/cgroups/perf_event.hpp      |   2 +-
 .../mesos/isolators/filesystem/linux.cpp        |  16 +--
 .../mesos/isolators/filesystem/linux.hpp        |   2 +-
 .../mesos/isolators/filesystem/posix.cpp        |   6 +-
 .../mesos/isolators/filesystem/posix.hpp        |   2 +-
 .../mesos/isolators/filesystem/shared.cpp       |  12 +-
 .../mesos/isolators/filesystem/shared.hpp       |   2 +-
 .../mesos/isolators/namespaces/pid.cpp          |  16 +--
 .../mesos/isolators/namespaces/pid.hpp          |   2 +-
 .../mesos/isolators/network/port_mapping.cpp    |  12 +-
 .../mesos/isolators/network/port_mapping.hpp    |   2 +-
 .../containerizer/mesos/isolators/posix.hpp     |   2 +-
 .../mesos/isolators/posix/disk.cpp              |   4 +-
 .../mesos/isolators/posix/disk.hpp              |   2 +-
 src/tests/containerizer/isolator.hpp            |  12 +-
 src/tests/containerizer/isolator_tests.cpp      |  12 +-
 .../containerizer/mesos_containerizer_tests.cpp |  62 ++++----
 src/tests/containerizer/port_mapping_tests.cpp  | 144 +++++++++----------
 29 files changed, 199 insertions(+), 199 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/include/mesos/slave/isolator.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/slave/isolator.hpp b/include/mesos/slave/isolator.hpp
index 9c46a85..c273d66 100644
--- a/include/mesos/slave/isolator.hpp
+++ b/include/mesos/slave/isolator.hpp
@@ -55,7 +55,7 @@ public:
   // will be run by the Launcher.
   // TODO(idownes): Any URIs or Environment in the CommandInfo will be
   // ignored; only the command value is used.
-  virtual process::Future<Option<ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const ContainerConfig& containerConfig) = 0;

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/include/mesos/slave/isolator.proto
----------------------------------------------------------------------
diff --git a/include/mesos/slave/isolator.proto b/include/mesos/slave/isolator.proto
index f4f93ca..c4b7b1f 100644
--- a/include/mesos/slave/isolator.proto
+++ b/include/mesos/slave/isolator.proto
@@ -95,7 +95,7 @@ message ContainerConfig {
  * ignored; only the command value is used. Further, we only accept
  * shell commands for the preparation commands.
  */
-message ContainerPrepareInfo
+message ContainerLaunchInfo
 {
   repeated CommandInfo commands = 1;
   optional Environment environment = 2;

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.cpp b/src/slave/containerizer/mesos/containerizer.cpp
index 0639324..ba4daf5 100644
--- a/src/slave/containerizer/mesos/containerizer.cpp
+++ b/src/slave/containerizer/mesos/containerizer.cpp
@@ -91,9 +91,9 @@ namespace slave {
 using mesos::modules::ModuleManager;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
 using mesos::slave::ContainerLogger;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -751,29 +751,29 @@ Future<bool> MesosContainerizerProcess::_launch(
 }
 
 
-static list<Option<ContainerPrepareInfo>> accumulate(
-    list<Option<ContainerPrepareInfo>> l,
-    const Option<ContainerPrepareInfo>& e)
+static list<Option<ContainerLaunchInfo>> accumulate(
+    list<Option<ContainerLaunchInfo>> l,
+    const Option<ContainerLaunchInfo>& e)
 {
   l.push_back(e);
   return l;
 }
 
 
-static Future<list<Option<ContainerPrepareInfo>>> _prepare(
+static Future<list<Option<ContainerLaunchInfo>>> _prepare(
     const Owned<Isolator>& isolator,
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig,
-    const list<Option<ContainerPrepareInfo>> prepareInfos)
+    const list<Option<ContainerLaunchInfo>> launchInfos)
 {
   // Propagate any failure.
   return isolator->prepare(containerId, executorInfo, containerConfig)
-    .then(lambda::bind(&accumulate, prepareInfos, lambda::_1));
+    .then(lambda::bind(&accumulate, launchInfos, lambda::_1));
 }
 
 
-Future<list<Option<ContainerPrepareInfo>>> MesosContainerizerProcess::prepare(
+Future<list<Option<ContainerLaunchInfo>>> MesosContainerizerProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const string& directory,
@@ -797,8 +797,8 @@ Future<list<Option<ContainerPrepareInfo>>> MesosContainerizerProcess::prepare(
   // We prepare the isolators sequentially according to their ordering
   // to permit basic dependency specification, e.g., preparing a
   // filesystem isolator before other isolators.
-  Future<list<Option<ContainerPrepareInfo>>> f =
-    list<Option<ContainerPrepareInfo>>();
+  Future<list<Option<ContainerLaunchInfo>>> f =
+    list<Option<ContainerLaunchInfo>>();
 
   foreach (const Owned<Isolator>& isolator, isolators) {
     // Chain together preparing each isolator.
@@ -810,7 +810,7 @@ Future<list<Option<ContainerPrepareInfo>>> MesosContainerizerProcess::prepare(
                             lambda::_1));
   }
 
-  containers_[containerId]->prepareInfos = f;
+  containers_[containerId]->launchInfos = f;
 
   return f;
 }
@@ -845,7 +845,7 @@ Future<bool> MesosContainerizerProcess::__launch(
     const SlaveID& slaveId,
     const PID<Slave>& slavePid,
     bool checkpoint,
-    const list<Option<ContainerPrepareInfo>>& prepareInfos)
+    const list<Option<ContainerLaunchInfo>>& launchInfos)
 {
   if (!containers_.contains(containerId)) {
     return Failure("Container has been destroyed");
@@ -858,12 +858,12 @@ Future<bool> MesosContainerizerProcess::__launch(
   // Determine the root filesystem for the container. Only one
   // isolator should return the container root filesystem.
   Option<string> rootfs;
-  foreach (const Option<ContainerPrepareInfo>& prepareInfo, prepareInfos) {
-    if (prepareInfo.isSome() && prepareInfo.get().has_rootfs()) {
+  foreach (const Option<ContainerLaunchInfo>& launchInfo, launchInfos) {
+    if (launchInfo.isSome() && launchInfo->has_rootfs()) {
       if (rootfs.isSome()) {
         return Failure("Only one isolator should return the container rootfs");
       } else {
-        rootfs = prepareInfo.get().rootfs();
+        rootfs = launchInfo->rootfs();
       }
     }
   }
@@ -890,27 +890,27 @@ Future<bool> MesosContainerizerProcess::__launch(
 
   JSON::Array commandArray;
   int namespaces = 0;
-  foreach (const Option<ContainerPrepareInfo>& prepareInfo, prepareInfos) {
-    if (!prepareInfo.isSome()) {
+  foreach (const Option<ContainerLaunchInfo>& launchInfo, launchInfos) {
+    if (!launchInfo.isSome()) {
       continue;
     }
 
     // Populate the list of additional commands to be run inside the container
     // context.
-    foreach (const CommandInfo& command, prepareInfo.get().commands()) {
+    foreach (const CommandInfo& command, launchInfo->commands()) {
       commandArray.values.emplace_back(JSON::protobuf(command));
     }
 
     // Process additional environment variables returned by isolators.
-    if (prepareInfo.get().has_environment()) {
+    if (launchInfo->has_environment()) {
       foreach (const Environment::Variable& variable,
-          prepareInfo.get().environment().variables()) {
+          launchInfo->environment().variables()) {
         environment[variable.name()] = variable.value();
       }
     }
 
-    if (prepareInfo.get().has_namespaces()) {
-      namespaces |= prepareInfo.get().namespaces();
+    if (launchInfo->has_namespaces()) {
+      namespaces |= launchInfo->namespaces();
     }
   }
 
@@ -1213,7 +1213,7 @@ void MesosContainerizerProcess::destroy(
     // We need to wait for the isolators to finish preparing to prevent
     // a race that the destroy method calls isolators' cleanup before
     // it starts preparing.
-    container->prepareInfos
+    container->launchInfos
       .onAny(defer(
           self(),
           &Self::___destroy,

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.hpp b/src/slave/containerizer/mesos/containerizer.hpp
index f530355..a8177fb 100644
--- a/src/slave/containerizer/mesos/containerizer.hpp
+++ b/src/slave/containerizer/mesos/containerizer.hpp
@@ -183,7 +183,7 @@ private:
       const std::list<mesos::slave::ContainerState>& recovered,
       const hashset<ContainerID>& orphans);
 
-  process::Future<std::list<Option<mesos::slave::ContainerPrepareInfo>>>
+  process::Future<std::list<Option<mesos::slave::ContainerLaunchInfo>>>
     prepare(const ContainerID& containerId,
             const ExecutorInfo& executorInfo,
             const std::string& directory,
@@ -215,7 +215,7 @@ private:
       const SlaveID& slaveId,
       const process::PID<Slave>& slavePid,
       bool checkpoint,
-      const std::list<Option<mesos::slave::ContainerPrepareInfo>>& scripts);
+      const std::list<Option<mesos::slave::ContainerLaunchInfo>>& launchInfos);
 
   process::Future<bool> isolate(
       const ContainerID& containerId,
@@ -295,8 +295,8 @@ private:
     // We keep track of the future that is waiting for all the
     // isolators' prepare futures, so that destroy will only start
     // calling cleanup after all isolators has finished preparing.
-    process::Future<std::list<Option<mesos::slave::ContainerPrepareInfo>>>
-      prepareInfos;
+    process::Future<std::list<Option<mesos::slave::ContainerLaunchInfo>>>
+      launchInfos;
 
     // We keep track of the future that is waiting for all the
     // isolators' isolate futures, so that destroy will only start

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolator.cpp b/src/slave/containerizer/mesos/isolator.cpp
index e49ecfa..4de9810 100644
--- a/src/slave/containerizer/mesos/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolator.cpp
@@ -24,8 +24,8 @@ using std::string;
 using std::list;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 
 namespace mesos {
@@ -57,7 +57,7 @@ Future<Nothing> MesosIsolator::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> MesosIsolator::prepare(
+Future<Option<ContainerLaunchInfo>> MesosIsolator::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolator.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolator.hpp b/src/slave/containerizer/mesos/isolator.hpp
index 6192b04..8bdccde 100644
--- a/src/slave/containerizer/mesos/isolator.hpp
+++ b/src/slave/containerizer/mesos/isolator.hpp
@@ -45,7 +45,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);
@@ -81,7 +81,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans) = 0;
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig) = 0;

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
index f37a3ef..afab0b4 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
@@ -46,8 +46,8 @@ using std::string;
 using std::vector;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -244,7 +244,7 @@ Future<Nothing> CgroupsCpushareIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> CgroupsCpushareIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> CgroupsCpushareIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -290,7 +290,7 @@ Future<Option<ContainerPrepareInfo>> CgroupsCpushareIsolatorProcess::prepare(
   }
 
   return update(containerId, executorInfo.resources())
-    .then([]() -> Future<Option<ContainerPrepareInfo>> {
+    .then([]() -> Future<Option<ContainerLaunchInfo>> {
       return None();
     });
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/cpushare.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.hpp b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.hpp
index d8310e6..9c331eb 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.hpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.hpp
@@ -52,7 +52,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp b/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
index b4a53fe..bc76a0b 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
@@ -54,8 +54,8 @@ using std::string;
 using std::vector;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -231,7 +231,7 @@ Future<Nothing> CgroupsMemIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> CgroupsMemIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> CgroupsMemIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -280,7 +280,7 @@ Future<Option<ContainerPrepareInfo>> CgroupsMemIsolatorProcess::prepare(
   pressureListen(containerId);
 
   return update(containerId, executorInfo.resources())
-    .then([]() -> Future<Option<ContainerPrepareInfo>> {
+    .then([]() -> Future<Option<ContainerLaunchInfo>> {
       return None();
     });
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/mem.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/mem.hpp b/src/slave/containerizer/mesos/isolators/cgroups/mem.hpp
index e17bb83..944544d 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/mem.hpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/mem.hpp
@@ -47,7 +47,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp
index ed6697c..5736214 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp
@@ -46,8 +46,8 @@
 #include "slave/containerizer/mesos/isolators/cgroups/perf_event.hpp"
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -206,7 +206,7 @@ Future<Nothing> CgroupsPerfEventIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> CgroupsPerfEventIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> CgroupsPerfEventIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
index 9e084d8..a996b10 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
@@ -43,7 +43,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
index 39850ae..ace9e30 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
@@ -51,8 +51,8 @@ using std::string;
 
 using mesos::slave::ContainerConfig;
 using mesos::slave::ContainerState;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::Isolator;
 
 namespace mesos {
@@ -255,7 +255,7 @@ Future<Nothing> LinuxFilesystemIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> LinuxFilesystemIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> LinuxFilesystemIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -275,8 +275,8 @@ Future<Option<ContainerPrepareInfo>> LinuxFilesystemIsolatorProcess::prepare(
 
   const Owned<Info>& info = infos[containerId];
 
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.set_namespaces(CLONE_NEWNS);
+  ContainerLaunchInfo launchInfo;
+  launchInfo.set_namespaces(CLONE_NEWNS);
 
   if (containerConfig.has_rootfs()) {
     // If the container changes its root filesystem, we need to mount
@@ -345,7 +345,7 @@ Future<Option<ContainerPrepareInfo>> LinuxFilesystemIsolatorProcess::prepare(
           "' as a shared mount: " + mount.error());
     }
 
-    prepareInfo.set_rootfs(rootfs);
+    launchInfo.set_rootfs(rootfs);
   }
 
   // Prepare the commands that will be run in the container's mount
@@ -358,12 +358,12 @@ Future<Option<ContainerPrepareInfo>> LinuxFilesystemIsolatorProcess::prepare(
     return Failure("Failed to generate isolation script: " + _script.error());
   }
 
-  CommandInfo* command = prepareInfo.add_commands();
+  CommandInfo* command = launchInfo.add_commands();
   command->set_value(_script.get());
 
   return update(containerId, executorInfo.resources())
-    .then([prepareInfo]() -> Future<Option<ContainerPrepareInfo>> {
-      return prepareInfo;
+    .then([launchInfo]() -> Future<Option<ContainerLaunchInfo>> {
+      return launchInfo;
     });
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/linux.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/linux.hpp b/src/slave/containerizer/mesos/isolators/filesystem/linux.hpp
index bdc9271..3acbd69 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/linux.hpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/linux.hpp
@@ -50,7 +50,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp b/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
index 6d14135..d914587 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
@@ -31,8 +31,8 @@ using std::list;
 using std::string;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -69,7 +69,7 @@ Future<Nothing> PosixFilesystemIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> PosixFilesystemIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> PosixFilesystemIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -95,7 +95,7 @@ Future<Option<ContainerPrepareInfo>> PosixFilesystemIsolatorProcess::prepare(
   infos.put(containerId, Owned<Info>(new Info(containerConfig.directory())));
 
   return update(containerId, executorInfo.resources())
-      .then([]() -> Future<Option<ContainerPrepareInfo>> { return None(); });
+      .then([]() -> Future<Option<ContainerLaunchInfo>> { return None(); });
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/posix.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/posix.hpp b/src/slave/containerizer/mesos/isolators/filesystem/posix.hpp
index 19b0287..b36a196 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/posix.hpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/posix.hpp
@@ -38,7 +38,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp b/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
index e052da0..c1b6e08 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
@@ -29,8 +29,8 @@ using std::set;
 using std::string;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -75,7 +75,7 @@ Future<Nothing> SharedFilesystemIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> SharedFilesystemIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> SharedFilesystemIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -101,8 +101,8 @@ Future<Option<ContainerPrepareInfo>> SharedFilesystemIsolatorProcess::prepare(
   set<string> containerPaths;
   containerPaths.insert(containerConfig.directory());
 
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.set_namespaces(CLONE_NEWNS);
+  ContainerLaunchInfo launchInfo;
+  launchInfo.set_namespaces(CLONE_NEWNS);
 
   foreach (const Volume& volume, executorInfo.container().volumes()) {
     // Because the filesystem is shared we require the container path
@@ -207,11 +207,11 @@ Future<Option<ContainerPrepareInfo>> SharedFilesystemIsolatorProcess::prepare(
       }
     }
 
-    prepareInfo.add_commands()->set_value(
+    launchInfo.add_commands()->set_value(
         "mount -n --bind " + hostPath + " " + volume.container_path());
   }
 
-  return prepareInfo;
+  return launchInfo;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/filesystem/shared.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/shared.hpp b/src/slave/containerizer/mesos/isolators/filesystem/shared.hpp
index 186b5d1..c3ac448 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/shared.hpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/shared.hpp
@@ -41,7 +41,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/namespaces/pid.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/namespaces/pid.cpp b/src/slave/containerizer/mesos/isolators/namespaces/pid.cpp
index 36b9dd8..fb21e6c 100644
--- a/src/slave/containerizer/mesos/isolators/namespaces/pid.cpp
+++ b/src/slave/containerizer/mesos/isolators/namespaces/pid.cpp
@@ -38,8 +38,8 @@ using std::set;
 using std::string;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -152,18 +152,18 @@ Future<Nothing> NamespacesPidIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> NamespacesPidIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> NamespacesPidIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
 {
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.set_namespaces(CLONE_NEWPID | CLONE_NEWNS);
+  ContainerLaunchInfo launchInfo;
+  launchInfo.set_namespaces(CLONE_NEWPID | CLONE_NEWNS);
 
   // Mask the bind mount root directory in each container so
   // containers cannot see the namespace bind mount of other
   // containers.
-  prepareInfo.add_commands()->set_value(
+  launchInfo.add_commands()->set_value(
       "mount -n --bind " + string(PID_NS_BIND_MOUNT_MASK_DIR) +
       " " + string(PID_NS_BIND_MOUNT_ROOT));
 
@@ -176,12 +176,12 @@ Future<Option<ContainerPrepareInfo>> NamespacesPidIsolatorProcess::prepare(
   // taken from unshare.c in utils-linux for --mount-proc. We use the
   // -n flag so the mount is not added to the mtab where it will not
   // be correctly removed with the namespace terminates.
-  prepareInfo.add_commands()->set_value(
+  launchInfo.add_commands()->set_value(
       "mount none /proc --make-private -o rec");
-  prepareInfo.add_commands()->set_value(
+  launchInfo.add_commands()->set_value(
       "mount -n -t proc proc /proc -o nosuid,noexec,nodev");
 
-  return prepareInfo;
+  return launchInfo;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp b/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
index 6d61155..e20b584 100644
--- a/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
+++ b/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
@@ -58,7 +58,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
index efc87e0..c8e5281 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
@@ -105,8 +105,8 @@ using std::vector;
 using filter::ip::PortRange;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -2107,7 +2107,7 @@ PortMappingIsolatorProcess::_recover(pid_t pid)
 }
 
 
-Future<Option<ContainerPrepareInfo>> PortMappingIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> PortMappingIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)
@@ -2163,17 +2163,17 @@ Future<Option<ContainerPrepareInfo>> PortMappingIsolatorProcess::prepare(
             << " for container " << containerId << " of executor '"
             << executorInfo.executor_id() << "'";
 
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.add_commands()->set_value(scripts(infos[containerId]));
+  ContainerLaunchInfo launchInfo;
+  launchInfo.add_commands()->set_value(scripts(infos[containerId]));
 
   // NOTE: the port mapping isolator itself doesn't require mount
   // namespace. However, if mount namespace is enabled because of
   // other isolators, we need to set mount sharing accordingly for
   // PORT_MAPPING_BIND_MOUNT_ROOT to avoid races described in
   // MESOS-1558. So we turn on mount namespace here for consistency.
-  prepareInfo.set_namespaces(CLONE_NEWNET | CLONE_NEWNS);
+  launchInfo.set_namespaces(CLONE_NEWNET | CLONE_NEWNS);
 
-  return prepareInfo;
+  return launchInfo;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
index b4097b5..ea58c42 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
@@ -154,7 +154,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/posix.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix.hpp b/src/slave/containerizer/mesos/isolators/posix.hpp
index 3d628aa..7cdf9ed 100644
--- a/src/slave/containerizer/mesos/isolators/posix.hpp
+++ b/src/slave/containerizer/mesos/isolators/posix.hpp
@@ -61,7 +61,7 @@ public:
     return Nothing();
   }
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig)

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/posix/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix/disk.cpp b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
index 075a4ec..5d43810 100644
--- a/src/slave/containerizer/mesos/isolators/posix/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
@@ -55,8 +55,8 @@ using std::string;
 using std::vector;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -103,7 +103,7 @@ Future<Nothing> PosixDiskIsolatorProcess::recover(
 }
 
 
-Future<Option<ContainerPrepareInfo>> PosixDiskIsolatorProcess::prepare(
+Future<Option<ContainerLaunchInfo>> PosixDiskIsolatorProcess::prepare(
     const ContainerID& containerId,
     const ExecutorInfo& executorInfo,
     const ContainerConfig& containerConfig)

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/slave/containerizer/mesos/isolators/posix/disk.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix/disk.hpp b/src/slave/containerizer/mesos/isolators/posix/disk.hpp
index cbb4f39..e718a11 100644
--- a/src/slave/containerizer/mesos/isolators/posix/disk.hpp
+++ b/src/slave/containerizer/mesos/isolators/posix/disk.hpp
@@ -80,7 +80,7 @@ public:
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/tests/containerizer/isolator.hpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/isolator.hpp b/src/tests/containerizer/isolator.hpp
index 8764846..0f9b21a 100644
--- a/src/tests/containerizer/isolator.hpp
+++ b/src/tests/containerizer/isolator.hpp
@@ -29,7 +29,7 @@ class TestIsolatorProcess : public slave::MesosIsolatorProcess
 {
 public:
   static Try<mesos::slave::Isolator*> create(
-      const Option<mesos::slave::ContainerPrepareInfo>& prepare)
+      const Option<mesos::slave::ContainerLaunchInfo>& prepare)
   {
     process::Owned<MesosIsolatorProcess> process(
         new TestIsolatorProcess(prepare));
@@ -43,12 +43,12 @@ public:
           const std::list<mesos::slave::ContainerState>&,
           const hashset<ContainerID>&));
 
-  virtual process::Future<Option<mesos::slave::ContainerPrepareInfo>> prepare(
+  virtual process::Future<Option<mesos::slave::ContainerLaunchInfo>> prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const mesos::slave::ContainerConfig& containerConfig)
   {
-    return prepareInfo;
+    return launchInfo;
   }
 
   MOCK_METHOD2(
@@ -72,8 +72,8 @@ public:
       process::Future<Nothing>(const ContainerID&));
 
 private:
-  TestIsolatorProcess( const Option<mesos::slave::ContainerPrepareInfo>& info)
-    : prepareInfo(info)
+  TestIsolatorProcess( const Option<mesos::slave::ContainerLaunchInfo>& info)
+    : launchInfo(info)
   {
     EXPECT_CALL(*this, watch(testing::_))
       .WillRepeatedly(testing::Return(promise.future()));
@@ -85,7 +85,7 @@ private:
       .WillRepeatedly(testing::Return(Nothing()));
   }
 
-  const Option<mesos::slave::ContainerPrepareInfo> prepareInfo;
+  const Option<mesos::slave::ContainerLaunchInfo> launchInfo;
 
   process::Promise<mesos::slave::ContainerLimitation> promise;
 };

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/tests/containerizer/isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/isolator_tests.cpp b/src/tests/containerizer/isolator_tests.cpp
index 9f67a2a..2343195 100644
--- a/src/tests/containerizer/isolator_tests.cpp
+++ b/src/tests/containerizer/isolator_tests.cpp
@@ -91,7 +91,7 @@ using mesos::internal::slave::PosixMemIsolatorProcess;
 using mesos::internal::slave::Slave;
 
 using mesos::slave::ContainerConfig;
-using mesos::slave::ContainerPrepareInfo;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::Isolator;
 
 using std::ostringstream;
@@ -472,7 +472,7 @@ TEST_F(LimitedCpuIsolatorTest, ROOT_CGROUPS_CFS_Enable_Cfs)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> prepare =
+  Future<Option<ContainerLaunchInfo>> prepare =
     isolator.get()->prepare(
         containerId,
         executorInfo,
@@ -588,7 +588,7 @@ TEST_F(LimitedCpuIsolatorTest, ROOT_CGROUPS_CFS_Big_Quota)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> prepare =
+  Future<Option<ContainerLaunchInfo>> prepare =
     isolator.get()->prepare(
         containerId,
         executorInfo,
@@ -676,7 +676,7 @@ TEST_F(LimitedCpuIsolatorTest, ROOT_CGROUPS_Pids_and_Tids)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> prepare =
+  Future<Option<ContainerLaunchInfo>> prepare =
     isolator.get()->prepare(
         containerId,
         executorInfo,
@@ -964,7 +964,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_RelativeVolume)
   ContainerConfig containerConfig;
   containerConfig.set_directory(flags.work_dir);
 
-  Future<Option<ContainerPrepareInfo> > prepare =
+  Future<Option<ContainerLaunchInfo> > prepare =
     isolator.get()->prepare(
         containerId,
         executorInfo,
@@ -1071,7 +1071,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_AbsoluteVolume)
   ContainerConfig containerConfig;
   containerConfig.set_directory(flags.work_dir);
 
-  Future<Option<ContainerPrepareInfo> > prepare =
+  Future<Option<ContainerLaunchInfo> > prepare =
     isolator.get()->prepare(
         containerId,
         executorInfo,

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/tests/containerizer/mesos_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/mesos_containerizer_tests.cpp b/src/tests/containerizer/mesos_containerizer_tests.cpp
index 00ae739..677fcc1 100644
--- a/src/tests/containerizer/mesos_containerizer_tests.cpp
+++ b/src/tests/containerizer/mesos_containerizer_tests.cpp
@@ -66,9 +66,9 @@ using mesos::internal::slave::state::RunState;
 using mesos::internal::slave::state::SlaveState;
 
 using mesos::slave::ContainerConfig;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::ContainerLimitation;
 using mesos::slave::ContainerLogger;
-using mesos::slave::ContainerPrepareInfo;
 using mesos::slave::ContainerState;
 using mesos::slave::Isolator;
 
@@ -94,12 +94,12 @@ public:
   // 'prepare' command(s).
   Try<MesosContainerizer*> CreateContainerizer(
       Fetcher* fetcher,
-      const vector<Option<ContainerPrepareInfo>>& prepares)
+      const vector<Option<ContainerLaunchInfo>>& launchInfos)
   {
     vector<Owned<Isolator>> isolators;
 
-    foreach (const Option<ContainerPrepareInfo>& prepare, prepares) {
-      Try<Isolator*> isolator = TestIsolatorProcess::create(prepare);
+    foreach (const Option<ContainerLaunchInfo>& launchInfo, launchInfos) {
+      Try<Isolator*> isolator = TestIsolatorProcess::create(launchInfo);
       if (isolator.isError()) {
         return Error(isolator.error());
       }
@@ -140,12 +140,12 @@ public:
 
   Try<MesosContainerizer*> CreateContainerizer(
       Fetcher* fetcher,
-      const Option<ContainerPrepareInfo>& prepare)
+      const Option<ContainerLaunchInfo>& launchInfo)
   {
-    vector<Option<ContainerPrepareInfo>> prepares;
-    prepares.push_back(prepare);
+    vector<Option<ContainerLaunchInfo>> launchInfos;
+    launchInfos.push_back(launchInfo);
 
-    return CreateContainerizer(fetcher, prepares);
+    return CreateContainerizer(fetcher, launchInfos);
   }
 };
 
@@ -158,12 +158,12 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, ScriptSucceeds)
 
   Fetcher fetcher;
 
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.add_commands()->set_value("touch " + file);
+  ContainerLaunchInfo launchInfo;
+  launchInfo.add_commands()->set_value("touch " + file);
 
   Try<MesosContainerizer*> containerizer = CreateContainerizer(
       &fetcher,
-      prepareInfo);
+      launchInfo);
   CHECK_SOME(containerizer);
 
   ContainerID containerId;
@@ -209,12 +209,12 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, ScriptFails)
 
   Fetcher fetcher;
 
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.add_commands()->set_value("touch " + file + " && exit 1");
+  ContainerLaunchInfo launchInfo;
+  launchInfo.add_commands()->set_value("touch " + file + " && exit 1");
 
   Try<MesosContainerizer*> containerizer = CreateContainerizer(
       &fetcher,
-      prepareInfo);
+      launchInfo);
   CHECK_SOME(containerizer);
 
   ContainerID containerId;
@@ -261,23 +261,23 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, MultipleScripts)
   string file1 = path::join(directory, "child.script.executed.1");
   string file2 = path::join(directory, "child.script.executed.2");
 
-  vector<Option<ContainerPrepareInfo>> prepares;
+  vector<Option<ContainerLaunchInfo>> launchInfos;
 
   // This isolator prepare command one will succeed if called first, otherwise
   // it won't get run.
-  ContainerPrepareInfo prepare1;
-  prepare1.add_commands()->set_value("touch " + file1 + " && exit 0");
-  prepares.push_back(prepare1);
+  ContainerLaunchInfo launch1;
+  launch1.add_commands()->set_value("touch " + file1 + " && exit 0");
+  launchInfos.push_back(launch1);
 
   // This will fail, either first or after the successful command.
-  ContainerPrepareInfo prepare2;
-  prepare2.add_commands()->set_value("touch " + file2 + " && exit 1");
-  prepares.push_back(prepare2);
+  ContainerLaunchInfo launch2;
+  launch2.add_commands()->set_value("touch " + file2 + " && exit 1");
+  launchInfos.push_back(launch2);
 
   Fetcher fetcher;
 
   Try<MesosContainerizer*> containerizer =
-    CreateContainerizer(&fetcher, prepares);
+    CreateContainerizer(&fetcher, launchInfos);
 
   CHECK_SOME(containerizer);
 
@@ -331,17 +331,17 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, ExecutorEnvironmentVariable)
 
   Fetcher fetcher;
 
-  ContainerPrepareInfo prepareInfo;
+  ContainerLaunchInfo launchInfo;
 
   Environment::Variable* variable =
-    prepareInfo.mutable_environment()->add_variables();
+    launchInfo.mutable_environment()->add_variables();
 
   variable->set_name("TEST_ENVIRONMENT");
   variable->set_value(file);
 
   Try<MesosContainerizer*> containerizer = CreateContainerizer(
       &fetcher,
-      prepareInfo);
+      launchInfo);
 
   CHECK_SOME(containerizer);
 
@@ -527,12 +527,12 @@ public:
 
   MOCK_METHOD3(
       prepare,
-      Future<Option<ContainerPrepareInfo>>(
+      Future<Option<ContainerLaunchInfo>>(
           const ContainerID&,
           const ExecutorInfo&,
           const ContainerConfig&));
 
-  virtual Future<Option<ContainerPrepareInfo>> _prepare(
+  virtual Future<Option<ContainerLaunchInfo>> _prepare(
       const ContainerID& containerId,
       const ExecutorInfo& executorInfo,
       const ContainerConfig& containerConfig)
@@ -642,7 +642,7 @@ TEST_F(MesosContainerizerDestroyTest, DestroyWhilePreparing)
   MockIsolator* isolator = new MockIsolator();
 
   Future<Nothing> prepare;
-  Promise<Option<ContainerPrepareInfo>> promise;
+  Promise<Option<ContainerLaunchInfo>> promise;
 
   // Simulate a long prepare from the isolator.
   EXPECT_CALL(*isolator, prepare(_, _, _))
@@ -697,9 +697,9 @@ TEST_F(MesosContainerizerDestroyTest, DestroyWhilePreparing)
   ASSERT_TRUE(wait.isPending());
 
   // Need to help the compiler to disambiguate between overloads.
-  ContainerPrepareInfo prepareInfo;
-  prepareInfo.add_commands()->CopyFrom(commandInfo);
-  Option<ContainerPrepareInfo> option = prepareInfo;
+  ContainerLaunchInfo launchInfo;
+  launchInfo.add_commands()->CopyFrom(commandInfo);
+  Option<ContainerLaunchInfo> option = launchInfo;
   promise.set(option);
 
   AWAIT_READY(wait);

http://git-wip-us.apache.org/repos/asf/mesos/blob/331939ff/src/tests/containerizer/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/port_mapping_tests.cpp b/src/tests/containerizer/port_mapping_tests.cpp
index 582df8a..fab16f6 100644
--- a/src/tests/containerizer/port_mapping_tests.cpp
+++ b/src/tests/containerizer/port_mapping_tests.cpp
@@ -78,7 +78,7 @@ using namespace routing::queueing;
 using mesos::internal::master::Master;
 
 using mesos::slave::ContainerConfig;
-using mesos::slave::ContainerPrepareInfo;
+using mesos::slave::ContainerLaunchInfo;
 using mesos::slave::Isolator;
 
 using std::list;
@@ -300,7 +300,7 @@ protected:
       int pipes[2],
       const ContainerID& containerId,
       const string& command,
-      const Option<ContainerPrepareInfo>& preparation)
+      const Option<ContainerLaunchInfo>& launchInfo)
   {
     CommandInfo commandInfo;
     commandInfo.set_value(command);
@@ -317,13 +317,13 @@ protected:
     launchFlags.pipe_read = pipes[0];
     launchFlags.pipe_write = pipes[1];
 
-    if (preparation.get().commands().size() != 1) {
-      return Error("No valid commands inside ContainerPrepareInfo.");
+    if (launchInfo->commands().size() != 1) {
+      return Error("No valid commands inside ContainerLaunchInfo.");
     }
 
     JSON::Object commands;
     JSON::Array array;
-    array.values.push_back(JSON::protobuf(preparation.get().commands(0)));
+    array.values.push_back(JSON::protobuf(launchInfo->commands(0)));
     commands.values["commands"] = array;
 
     launchFlags.commands = commands;
@@ -459,15 +459,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
   ContainerConfig containerConfig1;
   containerConfig1.set_directory(dir1.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation1 =
+  Future<Option<ContainerLaunchInfo>> launchInfo1 =
     isolator.get()->prepare(
         containerId1,
         executorInfo,
         containerConfig1);
 
-  AWAIT_READY(preparation1);
-  ASSERT_SOME(preparation1.get());
-  ASSERT_EQ(1, preparation1.get().get().commands().size());
+  AWAIT_READY(launchInfo1);
+  ASSERT_SOME(launchInfo1.get());
+  ASSERT_EQ(1, launchInfo1.get()->commands().size());
 
   ostringstream command1;
 
@@ -494,7 +494,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
       pipes,
       containerId1,
       command1.str(),
-      preparation1.get());
+      launchInfo1.get());
   ASSERT_SOME(pid);
 
   // Reap the forked child.
@@ -528,15 +528,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
   ContainerConfig containerConfig2;
   containerConfig2.set_directory(dir2.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation2 =
+  Future<Option<ContainerLaunchInfo>> launchInfo2 =
     isolator.get()->prepare(
         containerId2,
         executorInfo,
         containerConfig2);
 
-  AWAIT_READY(preparation2);
-  ASSERT_SOME(preparation2.get());
-  ASSERT_EQ(1, preparation2.get().get().commands().size());
+  AWAIT_READY(launchInfo2);
+  ASSERT_SOME(launchInfo2.get());
+  ASSERT_EQ(1, launchInfo2.get()->commands().size());
 
   ostringstream command2;
 
@@ -558,7 +558,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
       pipes,
       containerId2,
       command2.str(),
-      preparation2.get());
+      launchInfo2.get());
   ASSERT_SOME(pid);
 
   // Reap the forked child.
@@ -622,15 +622,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
   ContainerConfig containerConfig1;
   containerConfig1.set_directory(dir1.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation1 =
+  Future<Option<ContainerLaunchInfo>> launchInfo1 =
     isolator.get()->prepare(
         containerId1,
         executorInfo,
         containerConfig1);
 
-  AWAIT_READY(preparation1);
-  ASSERT_SOME(preparation1.get());
-  ASSERT_EQ(1, preparation1.get().get().commands().size());
+  AWAIT_READY(launchInfo1);
+  ASSERT_SOME(launchInfo1.get());
+  ASSERT_EQ(1, launchInfo1.get()->commands().size());
 
   ostringstream command1;
 
@@ -657,7 +657,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
       pipes,
       containerId1,
       command1.str(),
-      preparation1.get());
+      launchInfo1.get());
   ASSERT_SOME(pid);
 
   // Reap the forked child.
@@ -691,15 +691,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
   ContainerConfig containerConfig2;
   containerConfig2.set_directory(dir2.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation2 =
+  Future<Option<ContainerLaunchInfo>> launchInfo2 =
     isolator.get()->prepare(
         containerId2,
         executorInfo,
         containerConfig2);
 
-  AWAIT_READY(preparation2);
-  ASSERT_SOME(preparation2.get());
-  ASSERT_EQ(1, preparation2.get().get().commands().size());
+  AWAIT_READY(launchInfo2);
+  ASSERT_SOME(launchInfo2.get());
+  ASSERT_EQ(1, launchInfo2.get()->commands().size());
 
   ostringstream command2;
 
@@ -722,7 +722,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
       pipes,
       containerId2,
       command2.str(),
-      preparation2.get());
+      launchInfo2.get());
 
   ASSERT_SOME(pid);
 
@@ -787,15 +787,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerUDP)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command1;
 
@@ -822,7 +822,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerUDP)
       pipes,
       containerId,
       command1.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -905,15 +905,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerTCP)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command1;
 
@@ -940,7 +940,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerTCP)
       pipes,
       containerId,
       command1.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1031,15 +1031,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPExternal)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command;
   for (unsigned int i = 0; i < nameServers.size(); i++) {
@@ -1059,7 +1059,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPExternal)
       pipes,
       containerId,
       command.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1118,15 +1118,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPInternal)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command;
   command << "ping -c1 127.0.0.1 && ping -c1 " << hostIP
@@ -1140,7 +1140,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPInternal)
       pipes,
       containerId,
       command.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1208,15 +1208,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerARPExternal)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command;
   for (unsigned int i = 0; i < nameServers.size(); i++) {
@@ -1237,7 +1237,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerARPExternal)
       pipes,
       containerId,
       command.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1304,15 +1304,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_DNS)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   ostringstream command;
   for (unsigned int i = 0; i < nameServers.size(); i++) {
@@ -1332,7 +1332,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_DNS)
       pipes,
       containerId,
       command.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1396,15 +1396,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_TooManyContainers)
   ContainerConfig containerConfig1;
   containerConfig1.set_directory(dir1.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation1 =
+  Future<Option<ContainerLaunchInfo>> launchInfo1 =
     isolator.get()->prepare(
         containerId1,
         executorInfo,
         containerConfig1);
 
-  AWAIT_READY(preparation1);
-  ASSERT_SOME(preparation1.get());
-  ASSERT_EQ(1, preparation1.get().get().commands().size());
+  AWAIT_READY(launchInfo1);
+  ASSERT_SOME(launchInfo1.get());
+  ASSERT_EQ(1, launchInfo1.get()->commands().size());
 
   ostringstream command1;
   command1 << "sleep 1000";
@@ -1417,7 +1417,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_TooManyContainers)
       pipes,
       containerId1,
       command1.str(),
-      preparation1.get());
+      launchInfo1.get());
 
   ASSERT_SOME(pid);
 
@@ -1449,13 +1449,13 @@ TEST_F(PortMappingIsolatorTest, ROOT_TooManyContainers)
   ContainerConfig containerConfig2;
   containerConfig2.set_directory(dir2.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation2 =
+  Future<Option<ContainerLaunchInfo>> launchInfo2 =
     isolator.get()->prepare(
         containerId2,
         executorInfo,
         containerConfig2);
 
-  AWAIT_FAILED(preparation2);
+  AWAIT_FAILED(launchInfo2);
 
   // Ensure all processes are killed.
   AWAIT_READY(launcher.get()->destroy(containerId1));
@@ -1515,15 +1515,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_SmallEgressLimit)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   // Fill 'size' bytes of data. The actual content does not matter.
   string data(size.bytes(), 'a');
@@ -1549,7 +1549,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_SmallEgressLimit)
       pipes,
       containerId,
       command2.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 
@@ -1670,15 +1670,15 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_PortMappingStatistics)
   ContainerConfig containerConfig;
   containerConfig.set_directory(dir.get());
 
-  Future<Option<ContainerPrepareInfo>> preparation =
+  Future<Option<ContainerLaunchInfo>> launchInfo =
     isolator.get()->prepare(
         containerId,
         executorInfo,
         containerConfig);
 
-  AWAIT_READY(preparation);
-  ASSERT_SOME(preparation.get());
-  ASSERT_EQ(1, preparation.get().get().commands().size());
+  AWAIT_READY(launchInfo);
+  ASSERT_SOME(launchInfo.get());
+  ASSERT_EQ(1, launchInfo.get()->commands().size());
 
   // Fill 'size' bytes of data. The actual content does not matter.
   string data(size.bytes(), 'a');
@@ -1704,7 +1704,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_PortMappingStatistics)
       pipes,
       containerId,
       command2.str(),
-      preparation.get());
+      launchInfo.get());
 
   ASSERT_SOME(pid);
 


Mime
View raw message