Marked cgroups isolator as nesting aware.

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


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

Branch: refs/heads/master
Commit: 6280e160f10e4f90279d2946dabcf7650d16b7ac
Parents: aaa574e
Author: Jie Yu <yujie....@gmail.com>
Authored: Fri Sep 16 15:12:03 2016 -0700
Committer: Jie Yu <yujie....@gmail.com>
Committed: Fri Sep 16 17:38:59 2016 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp | 6 ++++++
 src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp | 2 ++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6280e160/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 
b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
index ecfa5db..ed7150a 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
@@ -140,6 +140,12 @@ Try<Isolator*> CgroupsIsolatorProcess::create(const Flags& 
flags)
 }
 
 
+bool CgroupsIsolatorProcess::supportsNesting()
+{
+  return true;
+}
+
+
 void CgroupsIsolatorProcess::initialize()
 {
   foreachvalue (const Owned<Subsystem>& subsystem, subsystems) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/6280e160/src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp 
b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp
index 38d1428..cf143ee 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.hpp
@@ -50,6 +50,8 @@ public:
 
   virtual ~CgroupsIsolatorProcess();
 
+  virtual bool supportsNesting();
+
   virtual process::Future<Nothing> recover(
       const std::list<mesos::slave::ContainerState>& states,
       const hashset<ContainerID>& orphans);

Reply via email to