You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2018/04/11 06:44:25 UTC

[1/3] mesos git commit: Fixed flaky `ROOT_IsolatorFlags` test.

Repository: mesos
Updated Branches:
  refs/heads/master 1a8cdfa50 -> 3dcd225db


Fixed flaky `ROOT_IsolatorFlags` test.

Starting more than one agent simultaneously in tests leads to a race
condition between a linux launcher which calls `cgroups::prepare()` for
the first slave and `LinuxLauncherProcess::recover()` which iterates
over cgroups hierarchy for the second slave. Therefore, `mesos/test`
cgroup that is created to check if the kernel supports nested cgroups
can be detected by a recovery process as they use same cgroup hierarchy
path by default. That leads to orphan containers and causes flakiness
of `ROOT_IsolatorFlags` test. To fix the issue, this patch adds
termination of an agent before starting a new one.

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


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

Branch: refs/heads/master
Commit: 1f20119a576f05b4b1d45f02250446a663dcaf69
Parents: 1a8cdfa
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Tue Apr 10 23:40:29 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Tue Apr 10 23:43:57 2018 -0700

----------------------------------------------------------------------
 .../containerizer/linux_capabilities_isolator_tests.cpp      | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1f20119a/src/tests/containerizer/linux_capabilities_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/linux_capabilities_isolator_tests.cpp b/src/tests/containerizer/linux_capabilities_isolator_tests.cpp
index 147f2cc..74b7b0f 100644
--- a/src/tests/containerizer/linux_capabilities_isolator_tests.cpp
+++ b/src/tests/containerizer/linux_capabilities_isolator_tests.cpp
@@ -744,24 +744,32 @@ TEST_F(LinuxCapabilitiesIsolatorFlagsTest, ROOT_IsolatorFlags)
   slave = StartSlave(&detector, flags);
   ASSERT_SOME(slave);
 
+  slave->reset();
+
   // Allowed is a subset of bounding, which is OK.
   flags.effective_capabilities = convert(set<Capability>({NET_RAW}));
   flags.bounding_capabilities = convert(set<Capability>({NET_RAW, NET_ADMIN}));
   slave = StartSlave(&detector, flags);
   ASSERT_SOME(slave);
 
+  slave->reset();
+
   // Both sets are allowed to be missing.
   flags.effective_capabilities = None();
   flags.bounding_capabilities = None();
   slave = StartSlave(&detector, flags);
   ASSERT_SOME(slave);
 
+  slave->reset();
+
   // Bounding capabilities are allowed to be missing.
   flags.effective_capabilities = convert(set<Capability>({NET_RAW}));
   flags.bounding_capabilities = None();
   slave = StartSlave(&detector, flags);
   ASSERT_SOME(slave);
 
+  slave->reset();
+
   // Effective capabilities are allowed to be missing.
   flags.effective_capabilities = None();
   flags.bounding_capabilities = convert(set<Capability>({NET_RAW}));


[3/3] mesos git commit: Updated minimum supported Linux kernel version.

Posted by gi...@apache.org.
Updated minimum supported Linux kernel version.

Implementation of `freezer` cgroup, which supports nested containers,
was introduced in 2.6.28. This patch updates documentation.

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


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

Branch: refs/heads/master
Commit: 3dcd225dbb817da676ae57f4f8871650ece5a0b8
Parents: 950ae66
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Tue Apr 10 23:40:52 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Tue Apr 10 23:43:58 2018 -0700

----------------------------------------------------------------------
 docs/building.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3dcd225d/docs/building.md
----------------------------------------------------------------------
diff --git a/docs/building.md b/docs/building.md
index 909d3ca..0def32b 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -24,7 +24,7 @@ There are different ways you can get Mesos:
 
 Mesos runs on Linux (64 Bit) and Mac OS X (64 Bit). To build Mesos from source, GCC 4.8.1+ or Clang 3.5+ is required.
 
-On Linux, a kernel version >= 2.6.23 is required at both build time and run time. For full support of process isolation under Linux a recent kernel >= 3.10 is required.
+On Linux, a kernel version >= 2.6.28 is required at both build time and run time. For full support of process isolation under Linux a recent kernel >= 3.10 is required.
 
 The Mesos agent also runs on Windows. To build Mesos from source, follow the instructions in the [Windows](windows.md) section.
 


[2/3] mesos git commit: Removed check for nested cgroup support in `cgroups::prepare()`.

Posted by gi...@apache.org.
Removed check for nested cgroup support in `cgroups::prepare()`.

Previously, we were checking for nested cgroup support while trying to
create a linux launcher. This was necessary to make sure that the
kernel supports creating nested cgroups. As we don't support old
kernel versions which don't support nested cgroups, this check can be
safely removed.

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


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

Branch: refs/heads/master
Commit: 950ae66a741142cc188b820c5a66c34e14867bb5
Parents: 1f20119
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Tue Apr 10 23:40:47 2018 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Tue Apr 10 23:43:58 2018 -0700

----------------------------------------------------------------------
 src/linux/cgroups.cpp | 29 -----------------------------
 1 file changed, 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/950ae66a/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 682b288..847f116 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -458,35 +458,6 @@ Try<string> prepare(
     }
   }
 
-  // Test for nested cgroup support.
-  // TODO(jieyu): Consider doing this test only once.
-  const string& testCgroup = path::join(cgroup, "test");
-
-  // Create a nested test cgroup if it doesn't exist.
-  exists = cgroups::exists(hierarchy.get(), testCgroup);
-  if (exists.isError()) {
-    return Error(
-        "Failed to check existence of the nested test cgroup " +
-        path::join(hierarchy.get(), testCgroup) +
-        ": " + exists.error());
-  }
-
-  if (!exists.get()) {
-    // Make sure this kernel supports creating nested cgroups.
-    Try<Nothing> create = cgroups::create(hierarchy.get(), testCgroup);
-    if (create.isError()) {
-      return Error(
-          "Your kernel might be too old to support nested cgroup: " +
-          create.error());
-    }
-  }
-
-  // Remove the nested 'test' cgroup.
-  Try<Nothing> remove = cgroups::remove(hierarchy.get(), testCgroup);
-  if (remove.isError()) {
-    return Error("Failed to remove the nested test cgroup: " + remove.error());
-  }
-
   return hierarchy.get();
 }