You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/05/09 08:12:02 UTC

[1/2] mesos git commit: Fixed provisioner recover blockage by non-existing rootfses dir.

Repository: mesos
Updated Branches:
  refs/heads/1.3.x d9faf891e -> e32a263c3


Fixed provisioner recover blockage by non-existing rootfses dir.

In provisioner recover, when listing the container rootfses, it is
possible that the 'rootfses' dir does not exist. Because a possible
race between the provisioner destroy and the agent restart. For
instance, while the provisioner is destroying the container dir the
agent restarts. Due to os::rmdir() is recursive by traversing the
FTS tree, it is possible that 'rootfses' dir is removed but the
others (e.g., scratch dir) are not.

Currently, we are returning an error if the 'rootfses' dir does not
exist, which blocks the agent from recovery. We should skip it if
'rootfses' does not exist.

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


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

Branch: refs/heads/1.3.x
Commit: a58bb869190ce9ce0a4410a9b33f9c994bcd9d6c
Parents: d9faf89
Author: Gilbert Song <so...@gmail.com>
Authored: Tue May 9 09:56:13 2017 +0200
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue May 9 09:58:23 2017 +0200

----------------------------------------------------------------------
 src/slave/containerizer/mesos/provisioner/paths.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a58bb869/src/slave/containerizer/mesos/provisioner/paths.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/paths.cpp b/src/slave/containerizer/mesos/provisioner/paths.cpp
index d2de98b..268dbeb 100644
--- a/src/slave/containerizer/mesos/provisioner/paths.cpp
+++ b/src/slave/containerizer/mesos/provisioner/paths.cpp
@@ -206,7 +206,13 @@ Try<hashmap<string, hashset<string>>> listContainerRootfses(
       continue;
     }
 
-    Try<list<string>> rootfses = os::ls(getRootfsesDir(backendDir));
+    string rootfsesDir = getRootfsesDir(backendDir);
+    if (!os::stat::isdir(rootfsesDir)) {
+      LOG(WARNING) << "Ignoring unexpected rootfses at: " << rootfsesDir;
+      continue;
+    }
+
+    Try<list<string>> rootfses = os::ls(rootfsesDir);
     if (rootfses.isError()) {
       return Error("Unable to list the backend directory: " + rootfses.error());
     }


[2/2] mesos git commit: Added MESOS-7471 to 1.3.1 CHANGELOG.

Posted by ji...@apache.org.
Added MESOS-7471 to 1.3.1 CHANGELOG.


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

Branch: refs/heads/1.3.x
Commit: e32a263c3b2cdade197f4d8683a33594e7155261
Parents: a58bb86
Author: Jie Yu <yu...@gmail.com>
Authored: Tue May 9 10:08:17 2017 +0200
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue May 9 10:11:48 2017 +0200

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e32a263c/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index db34ba8..34e85cc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ Release Notes - Mesos - Version 1.3.1 (WIP)
 All Issues:
 ** Bug
   * [MESOS-7429] - Allow isolators to inject task-specific environment variables.
+  * [MESOS-7471] - Provisioner recover should not always assume 'rootfses' dir exists.
 
 
 Release Notes - Mesos - Version 1.3.0