You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2017/03/17 17:40:42 UTC

mesos git commit: No need to set `agent_subsystems` for all the slave tests.

Repository: mesos
Updated Branches:
  refs/heads/master 8dd18dfd4 -> 62161ac44


No need to set `agent_subsystems` for all the slave tests.

We do not specifically depend on or test them, and since the logic
of moving the slave into its own cgroup is done outside of the
`Slave` class now, setting the `agent_subsystems` in the tests would
have no effect.

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


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

Branch: refs/heads/master
Commit: 62161ac4416323b7373cc5e2a63b285f6f510d11
Parents: 8dd18df
Author: Anindya Sinha <an...@apple.com>
Authored: Fri Mar 17 10:28:08 2017 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Fri Mar 17 10:28:08 2017 -0700

----------------------------------------------------------------------
 src/tests/containerizer/cgroups_isolator_tests.cpp |  6 ------
 src/tests/containerizer/io_switchboard_tests.cpp   | 15 ---------------
 src/tests/containerizer/memory_pressure_tests.cpp  |  2 --
 src/tests/mesos.cpp                                |  3 ---
 src/tests/slave_recovery_tests.cpp                 | 12 ------------
 5 files changed, 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/62161ac4/src/tests/containerizer/cgroups_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cgroups_isolator_tests.cpp b/src/tests/containerizer/cgroups_isolator_tests.cpp
index deb48c3..d352e69 100644
--- a/src/tests/containerizer/cgroups_isolator_tests.cpp
+++ b/src/tests/containerizer/cgroups_isolator_tests.cpp
@@ -971,12 +971,6 @@ TEST_F(CgroupsIsolatorTest, ROOT_CGROUPS_PERF_PerfForward)
   slave::Flags flags = CreateSlaveFlags();
   flags.isolation = "cgroups/cpu,cgroups/mem";
 
-  // TODO(jieyu): This is necessary because currently, we don't have a
-  // way to kill and wait for the perf process to finish, and cgroups
-  // cleanup function does not yet support killing processes without a
-  // freezer cgroup.
-  flags.agent_subsystems = None();
-
   Fetcher fetcher;
 
   Try<MesosContainerizer*> create =

http://git-wip-us.apache.org/repos/asf/mesos/blob/62161ac4/src/tests/containerizer/io_switchboard_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/io_switchboard_tests.cpp b/src/tests/containerizer/io_switchboard_tests.cpp
index 9408ba7..b19961e 100644
--- a/src/tests/containerizer/io_switchboard_tests.cpp
+++ b/src/tests/containerizer/io_switchboard_tests.cpp
@@ -710,9 +710,6 @@ TEST_F(IOSwitchboardTest, ContainerAttach)
   slave::Flags flags = CreateSlaveFlags();
   flags.launcher = "posix";
   flags.isolation = "posix/cpu";
-#ifdef __linux__
-  flags.agent_subsystems = None();
-#endif
 
   Fetcher fetcher;
 
@@ -779,9 +776,6 @@ TEST_F(IOSwitchboardTest, OutputRedirectionWithTTY)
   slave::Flags flags = CreateSlaveFlags();
   flags.launcher = "posix";
   flags.isolation = "posix/cpu";
-#ifdef __linux__
-  flags.agent_subsystems = None();
-#endif
 
   Fetcher fetcher;
 
@@ -847,9 +841,6 @@ TEST_F(IOSwitchboardTest, KillSwitchboardContainerDestroyed)
   slave::Flags flags = CreateSlaveFlags();
   flags.launcher = "posix";
   flags.isolation = "posix/cpu";
-#ifdef __linux__
-  flags.agent_subsystems = None();
-#endif
 
   Fetcher fetcher;
 
@@ -945,9 +936,6 @@ TEST_F(IOSwitchboardTest, DISABLED_RecoverThenKillSwitchboardContainerDestroyed)
   slave::Flags flags = CreateSlaveFlags();
   flags.launcher = "posix";
   flags.isolation = "posix/cpu";
-#ifdef __linux__
-  flags.agent_subsystems = None();
-#endif
 
   Fetcher fetcher;
 
@@ -1069,9 +1057,6 @@ TEST_F(IOSwitchboardTest, ContainerAttachAfterSlaveRestart)
   slave::Flags flags = CreateSlaveFlags();
   flags.launcher = "posix";
   flags.isolation = "posix/cpu";
-#ifdef __linux__
-  flags.agent_subsystems = None();
-#endif
 
   Fetcher fetcher;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/62161ac4/src/tests/containerizer/memory_pressure_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/memory_pressure_tests.cpp b/src/tests/containerizer/memory_pressure_tests.cpp
index f046360..c4ad779 100644
--- a/src/tests/containerizer/memory_pressure_tests.cpp
+++ b/src/tests/containerizer/memory_pressure_tests.cpp
@@ -83,7 +83,6 @@ TEST_F(MemoryPressureMesosTest, CGROUPS_ROOT_Statistics)
 
   // We only care about memory cgroup for this test.
   flags.isolation = "cgroups/mem";
-  flags.agent_subsystems = None();
 
   Fetcher fetcher;
 
@@ -201,7 +200,6 @@ TEST_F(MemoryPressureMesosTest, CGROUPS_ROOT_SlaveRecovery)
 
   // We only care about memory cgroup for this test.
   flags.isolation = "cgroups/mem";
-  flags.agent_subsystems = None();
 
   Fetcher fetcher;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/62161ac4/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index cdd9bc6..3333c50 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -565,9 +565,6 @@ slave::Flags ContainerizerTest<slave::MesosContainerizer>::CreateSlaveFlags()
     flags.isolation = "cgroups/cpu,cgroups/mem";
     flags.cgroups_hierarchy = baseHierarchy;
     flags.cgroups_root = TEST_CGROUPS_ROOT + "_" + UUID::random().toString();
-
-    // Enable putting the slave into memory and cpuacct cgroups.
-    flags.agent_subsystems = "memory,cpuacct";
   } else {
     flags.isolation = "posix/cpu,posix/mem";
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/62161ac4/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index e6b2bdd..09bfa75 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -3769,11 +3769,6 @@ TYPED_TEST(SlaveRecoveryTest, MultipleSlaves)
   // cgroups isolation is involved.
   flags1.isolation = "filesystem/posix,posix/mem,posix/cpu";
 
-#ifdef __linux__
-  // Disable putting slave into cgroup(s) because this is a multi-slave test.
-  flags1.agent_subsystems = None();
-#endif
-
   Fetcher fetcher;
 
   Owned<MasterDetector> detector = master.get()->createDetector();
@@ -3813,11 +3808,6 @@ TYPED_TEST(SlaveRecoveryTest, MultipleSlaves)
   // cgroups isolation is involved.
   flags2.isolation = "filesystem/posix,posix/mem,posix/cpu";
 
-#ifdef __linux__
-  // Disable putting slave into cgroup(s) because this is a multi-slave test.
-  flags2.agent_subsystems = None();
-#endif
-
   Try<TypeParam*> _containerizer2 = TypeParam::create(flags2, true, &fetcher);
   ASSERT_SOME(_containerizer2);
   Owned<slave::Containerizer> containerizer2(_containerizer2.get());
@@ -4125,7 +4115,6 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceForward)
   // isolation.
   slave::Flags flags = this->CreateSlaveFlags();
   flags.isolation = "cgroups/cpu,cgroups/mem";
-  flags.agent_subsystems = "";
 
   Fetcher fetcher;
 
@@ -4230,7 +4219,6 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
   // Start a slave using a containerizer with pid namespace isolation.
   slave::Flags flags = this->CreateSlaveFlags();
   flags.isolation = "cgroups/cpu,cgroups/mem,filesystem/linux,namespaces/pid";
-  flags.agent_subsystems = "";
 
   Fetcher fetcher;