You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/07/15 01:23:47 UTC

mesos git commit: Fixed a hard-coded forward slash in agent path logic.

Repository: mesos
Updated Branches:
  refs/heads/master a857696eb -> 4b6269c1f


Fixed a hard-coded forward slash in agent path logic.

This logic would break on Windows in any place it was used:
* Docker containerizer,
* PathsTest.ParseExecutorRunPath (now un-disabled)
* And the filesystem/linux isolator (obviously not available on Windows)

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


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

Branch: refs/heads/master
Commit: 4b6269c1f32f835cc1cc54551373ee2c7674cfe0
Parents: a857696
Author: Li Li <li...@hotmail.com>
Authored: Fri Jul 14 18:16:21 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 14 18:22:03 2017 -0700

----------------------------------------------------------------------
 src/slave/paths.cpp       | 3 ++-
 src/tests/paths_tests.cpp | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4b6269c1/src/slave/paths.cpp
----------------------------------------------------------------------
diff --git a/src/slave/paths.cpp b/src/slave/paths.cpp
index c08e83c..eb6a28e 100644
--- a/src/slave/paths.cpp
+++ b/src/slave/paths.cpp
@@ -88,7 +88,8 @@ Try<ExecutorRunPath> parseExecutorRunPath(
         "the root directory: " + rootDir);
   }
 
-  vector<string> tokens = strings::tokenize(dir.substr(rootDir.size()), "/");
+  vector<string> tokens = strings::tokenize(
+      dir.substr(rootDir.size()), stringify(os::PATH_SEPARATOR));
 
   // A complete executor run path consists of at least 8 tokens, which
   // includes the four named directories and the four IDs.

http://git-wip-us.apache.org/repos/asf/mesos/blob/4b6269c1/src/tests/paths_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/paths_tests.cpp b/src/tests/paths_tests.cpp
index ec55167..07e0cac 100644
--- a/src/tests/paths_tests.cpp
+++ b/src/tests/paths_tests.cpp
@@ -103,7 +103,7 @@ TEST_F(PathsTest, CreateExecutorDirectory)
 }
 
 
-TEST_F_TEMP_DISABLED_ON_WINDOWS(PathsTest, ParseExecutorRunPath)
+TEST_F(PathsTest, ParseExecutorRunPath)
 {
   string goodDir = paths::getExecutorRunPath(
       rootDir,