mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ne...@apache.org
Subject mesos git commit: Improved error reporting in status update manager.
Date Tue, 09 May 2017 23:04:27 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 315cec172 -> 1bdb1afef


Improved error reporting in status update manager.

When an I/O operation fails, we should include the error message
returned by the I/O operation in the error we return to the caller.

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


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

Branch: refs/heads/master
Commit: 1bdb1afeff17fe4c9a4fee3018d5e6b8071b0651
Parents: 315cec1
Author: Neil Conway <neil.conway@gmail.com>
Authored: Tue May 9 15:08:43 2017 -0700
Committer: Neil Conway <neil.conway@gmail.com>
Committed: Tue May 9 16:04:21 2017 -0700

----------------------------------------------------------------------
 src/slave/status_update_manager.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1bdb1afe/src/slave/status_update_manager.cpp
----------------------------------------------------------------------
diff --git a/src/slave/status_update_manager.cpp b/src/slave/status_update_manager.cpp
index df63a70..0cd88ac 100644
--- a/src/slave/status_update_manager.cpp
+++ b/src/slave/status_update_manager.cpp
@@ -669,9 +669,10 @@ StatusUpdateStream::StatusUpdateStream(
         taskId);
 
     // Create the base updates directory, if it doesn't exist.
-    Try<Nothing> directory = os::mkdir(Path(path.get()).dirname());
+    const string& dirName = Path(path.get()).dirname();
+    Try<Nothing> directory = os::mkdir(dirName);
     if (directory.isError()) {
-      error = "Failed to create " + Path(path.get()).dirname();
+      error = "Failed to create '" + dirName + "': " + directory.error();
       return;
     }
 
@@ -686,7 +687,8 @@ StatusUpdateStream::StatusUpdateStream(
         S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
     if (result.isError()) {
-      error = "Failed to open '" + path.get() + "' for status updates";
+      error = "Failed to open '" + path.get() +
+              "' for status updates: " + result.error();
       return;
     }
 


Mime
View raw message