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/15 23:40:22 UTC

mesos git commit: Removed logic in test that resets agent cgroups during shutdown.

Repository: mesos
Updated Branches:
  refs/heads/master a9bd7078e -> f08754d44


Removed logic in test that resets agent cgroups during shutdown.

- This is because agent process main method instead of the `Slave`
  class does the cgroup assignment after 4575e38.
- A followup review will clean up uses of --agent_subsystems in tests.


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

Branch: refs/heads/master
Commit: f08754d44912db01d2ce5b2bdfc8e88c16cd561d
Parents: a9bd707
Author: Jiang Yan Xu <xu...@apple.com>
Authored: Wed Mar 15 16:39:55 2017 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Wed Mar 15 16:40:08 2017 -0700

----------------------------------------------------------------------
 src/tests/cluster.cpp | 33 ---------------------------------
 1 file changed, 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f08754d4/src/tests/cluster.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp
index 30076e8..15eaf42 100644
--- a/src/tests/cluster.cpp
+++ b/src/tests/cluster.cpp
@@ -611,39 +611,6 @@ void Slave::terminate()
 void Slave::wait()
 {
   process::wait(pid);
-
-#ifdef __linux__
-  // Remove all of this processes threads into the root cgroups - this
-  // simulates the slave process terminating and permits a new slave to start
-  // when the --agent_subsystems flag is used.
-  if (flags.agent_subsystems.isSome()) {
-    foreach (const std::string& subsystem,
-             strings::tokenize(flags.agent_subsystems.get(), ",")) {
-      std::string hierarchy = path::join(flags.cgroups_hierarchy, subsystem);
-
-      std::string cgroup = path::join(flags.cgroups_root, "slave");
-
-      Try<bool> exists = cgroups::exists(hierarchy, cgroup);
-      if (exists.isError() || !exists.get()) {
-        EXIT(EXIT_FAILURE)
-          << "Failed to find cgroup " << cgroup
-          << " for subsystem " << subsystem
-          << " under hierarchy " << hierarchy
-          << " for agent: " + exists.error();
-      }
-
-      // Move all of our threads into the root cgroup.
-      Try<Nothing> assign = cgroups::assign(hierarchy, "", getpid());
-      if (assign.isError()) {
-        EXIT(EXIT_FAILURE)
-          << "Failed to move agent threads into cgroup " << cgroup
-          << " for subsystem " << subsystem
-          << " under hierarchy " << hierarchy
-          << " for agent: " + assign.error();
-      }
-    }
-  }
-#endif // __linux__
 }
 
 } // namespace cluster {