You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/02/04 23:42:36 UTC
[3/5] mesos git commit: Drop `404 NotFound` responses in the executor
library.
Drop `404 NotFound` responses in the executor library.
Previously, we did not use to drop `404 NotFound` responses in the library and
send `Event::Error` to executor. However, this can be trigerred upon an agent
restart when it has not yet set up HTTP routes.
Review: https://reviews.apache.org/r/42844/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e3c3cf88
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e3c3cf88
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e3c3cf88
Branch: refs/heads/master
Commit: e3c3cf88688d08db5699d5c70616702d92c361e5
Parents: 4a211e5
Author: Anand Mazumdar <ma...@gmail.com>
Authored: Thu Feb 4 14:41:15 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu Feb 4 14:41:15 2016 -0800
----------------------------------------------------------------------
src/executor/executor.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e3c3cf88/src/executor/executor.cpp
----------------------------------------------------------------------
diff --git a/src/executor/executor.cpp b/src/executor/executor.cpp
index 92334ff..c5f22e7 100644
--- a/src/executor/executor.cpp
+++ b/src/executor/executor.cpp
@@ -503,6 +503,14 @@ protected:
return;
}
+ if (response->code == process::http::Status::NOT_FOUND) {
+ // This could happen if the agent libprocess process has not yet set up
+ // HTTP routes.
+ LOG(WARNING) << "Received '" << response->status << "' ("
+ << response->body << ") for " << call.type();
+ return;
+ }
+
// We should not be able to get here since we already do validation
// of calls before sending them to the agent.
error("Received unexpected '" + response->status + "' (" +