You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2017/09/13 19:32:43 UTC

[1/3] mesos git commit: Ignored /proc/self/ns/pid_for_children when listing namespaces.

Repository: mesos
Updated Branches:
  refs/heads/1.3.x 5068b214c -> 211f41770


Ignored /proc/self/ns/pid_for_children when listing namespaces.

Since Linux 4.12, /proc/self/ns/pid_for_children is a handle for the PID
namespace of child processes created by this process. Since this is not
a namespace type in its own, we should ignore this file when listing
namespaces via `ls /proc/self/ns`.

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


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

Branch: refs/heads/1.3.x
Commit: c721e279dcfb6661dc7dd45b8433daacc3997b27
Parents: 2b3f7b0
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Wed Sep 13 15:24:33 2017 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Wed Sep 13 15:28:26 2017 -0400

----------------------------------------------------------------------
 src/linux/ns.hpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c721e279/src/linux/ns.hpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.hpp b/src/linux/ns.hpp
index f8173a1..6292bfb 100644
--- a/src/linux/ns.hpp
+++ b/src/linux/ns.hpp
@@ -129,7 +129,11 @@ inline std::set<std::string> namespaces()
   Try<std::list<std::string>> entries = os::ls("/proc/self/ns");
   if (entries.isSome()) {
     foreach (const std::string& entry, entries.get()) {
-      result.insert(entry);
+      // Introduced in Linux 4.12, pid_for_children is a handle for the PID
+      // namespace of child processes created by the current process.
+      if (entry != "pid_for_children") {
+        result.insert(entry);
+      }
     }
   }
   return result;


[2/3] mesos git commit: Ignored cgroups v2 hierarchy when parsing /proc/self/cgroups.

Posted by ka...@apache.org.
Ignored cgroups v2 hierarchy when parsing /proc/self/cgroups.

Cgroups v2 hierarchies don't list the "controllers" field (e.g.,
"0::/user.slice/user-1000.slice/session-5.scope) is empty and hence
the cgroup parser failes. We should simply skip over fields with empty
controller field.

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


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

Branch: refs/heads/1.3.x
Commit: 2b3f7b051b644441c307e50983a45cbd79ce58c8
Parents: 5068b21
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Wed Sep 13 15:24:15 2017 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Wed Sep 13 15:28:26 2017 -0400

----------------------------------------------------------------------
 src/linux/cgroups.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2b3f7b05/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 334005a..17a5770 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1908,7 +1908,10 @@ Result<string> cgroup(pid_t pid, const string& subsystem)
   foreach (const string& line, strings::tokenize(read.get(), "\n")) {
     vector<string> tokens = strings::tokenize(line, ":");
 
-    if (tokens.size() != 3) {
+    // The second field is empty for cgroups v2 hierarchy.
+    if (tokens.size() == 2) {
+      continue;
+    } else if (tokens.size() != 3) {
       return Error("Unexpected format in " + path);
     }
 


[3/3] mesos git commit: Added MESOS-796[89] to 1.3.2 changelog.

Posted by ka...@apache.org.
Added MESOS-796[89] to 1.3.2 changelog.


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

Branch: refs/heads/1.3.x
Commit: 211f41770aa6c4d9ecea6a6c0bdd08700522dd5f
Parents: c721e27
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Wed Sep 13 15:29:51 2017 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Wed Sep 13 15:29:51 2017 -0400

----------------------------------------------------------------------
 CHANGELOG | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/211f4177/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index e25cd8a..d7273a5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,8 @@ All Issues:
   * [MESOS-7912] - Master WebUI not working in Chrome.
   * [MESOS-7926] - Abnormal termination of default executor can cause MesosContainerizer::destroy to fail.
   * [MESOS-7934] - OOM due to LibeventSSLSocket send incorrectly returning 0 after shutdown.
+  * [MESOS-7968] - Handle `/proc/self/ns/pid_for_children` when parsing available namespace.
+  * [MESOS-7969] - Handle cgroups v2 hierarchy when parsing /proc/self/cgroups.
 
 
 Release Notes - Mesos - Version 1.3.1