You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/05/27 02:24:17 UTC
[7/9] mesos git commit: Don't crash the agent when an unknown
executor re-registers.
Don't crash the agent when an unknown executor re-registers.
Rather than crashing the agent, the agent will tell the executor
to shut down.
Review: https://reviews.apache.org/r/59590
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/eccae601
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/eccae601
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/eccae601
Branch: refs/heads/1.1.x
Commit: eccae601385ccfabe976e42e07b73268732f217d
Parents: 41d3666
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 16:44:24 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 19:18:17 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/eccae601/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index a15b0a3..253093e 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3444,7 +3444,14 @@ void Slave::reregisterExecutor(
}
Executor* executor = framework->getExecutor(executorId);
- CHECK_NOTNULL(executor);
+
+ if (executor == nullptr) {
+ LOG(WARNING) << "Shutting down unknown executor '" << executorId << "'"
+ << " of framework " << frameworkId;
+
+ reply(ShutdownExecutorMessage());
+ return;
+ }
switch (executor->state) {
case Executor::TERMINATING: