You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2017/11/06 23:22:57 UTC
mesos git commit: Improved the fetcher exit status log message.
Repository: mesos
Updated Branches:
refs/heads/master 2619824c9 -> e796a0826
Improved the fetcher exit status log message.
When the fetcher fails, we emit a message with its exit status,
but the `status` is the return value from wait(2) so we should
be using WSTRINGIFY.
Review: https://reviews.apache.org/r/63594/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e796a082
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e796a082
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e796a082
Branch: refs/heads/master
Commit: e796a0826ecf6761922634e792a92ca07102415b
Parents: 2619824
Author: James Peach <jp...@apache.org>
Authored: Mon Nov 6 14:43:05 2017 -0800
Committer: James Peach <jp...@apache.org>
Committed: Mon Nov 6 15:22:23 2017 -0800
----------------------------------------------------------------------
src/slave/containerizer/fetcher.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e796a082/src/slave/containerizer/fetcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/fetcher.cpp b/src/slave/containerizer/fetcher.cpp
index ba5b097..8c4b7e6 100644
--- a/src/slave/containerizer/fetcher.cpp
+++ b/src/slave/containerizer/fetcher.cpp
@@ -43,6 +43,8 @@
#include "hdfs/hdfs.hpp"
+#include "common/status_utils.hpp"
+
#include "slave/containerizer/fetcher_process.hpp"
using std::list;
@@ -888,19 +890,18 @@ Future<Nothing> FetcherProcess::run(
// Remember this PID in case we need to kill the subprocess. See
// FetcherProcess::kill(). This value gets removed after we wait on
// the subprocess.
- subprocessPids[containerId] = fetcherSubprocess.get().pid();
+ subprocessPids[containerId] = fetcherSubprocess->pid();
- return fetcherSubprocess.get().status()
+ return fetcherSubprocess->status()
.then(defer(self(), [=](const Option<int>& status) -> Future<Nothing> {
if (status.isNone()) {
return Failure("No status available from mesos-fetcher");
}
- if (status.get() != 0) {
+ if (!WSUCCEEDED(status.get())) {
return Failure("Failed to fetch all URIs for container '" +
- stringify(containerId) +
- "' with exit status: " +
- stringify(status.get()));
+ stringify(containerId) + "': " +
+ WSTRINGIFY(status.get()));
}
return Nothing();