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/26 23:29:54 UTC
[1/6] mesos git commit: Don't crash when re-registering executor from
an unknown framework.
Repository: mesos
Updated Branches:
refs/heads/master e611b5478 -> 5ba175f5e
Don't crash when re-registering executor from an unknown framework.
Rather than crashing the agent, the agent will tell the executor
to shut down.
Review: https://reviews.apache.org/r/59589
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0d0af7a5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0d0af7a5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0d0af7a5
Branch: refs/heads/master
Commit: 0d0af7a5ebb35e3b50126a2adcdde3b0ee5b7dcc
Parents: e611b54
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 15:23:30 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 16:29:43 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d0af7a5/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index f827dae..3865d2a 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3997,11 +3997,14 @@ void Slave::reregisterExecutor(
return;
}
- LOG(INFO) << "Re-registering executor '" << executorId
- << "' of framework " << frameworkId;
+ if (!frameworks.contains(frameworkId)) {
+ LOG(WARNING) << "Shutting down executor '" << executorId << "'"
+ << " of framework " << frameworkId
+ << " because the framework is unknown";
- CHECK(frameworks.contains(frameworkId))
- << "Unknown framework " << frameworkId;
+ reply(ShutdownExecutorMessage());
+ return;
+ }
Framework* framework = frameworks[frameworkId];
[2/6] mesos git commit: Minor logging cleanup to put open/close
quotes on the same line.
Posted by bm...@apache.org.
Minor logging cleanup to put open/close quotes on the same line.
Review: https://reviews.apache.org/r/59594
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5ba175f5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5ba175f5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5ba175f5
Branch: refs/heads/master
Commit: 5ba175f5ef51d55c4b510c8e5d406bda0ff631ec
Parents: 5c178b3
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 16:53:08 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5ba175f5/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index bd84bc5..055e496 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4017,9 +4017,9 @@ void Slave::reregisterExecutor(
<< framework->state;
if (framework->state == Framework::TERMINATING) {
- LOG(WARNING) << "Shutting down executor '" << executorId
- << "' as the framework " << frameworkId
- << " is terminating";
+ LOG(WARNING) << "Shutting down executor '" << executorId << "'"
+ << " of framework " << frameworkId
+ << " because the framework is terminating";
reply(ShutdownExecutorMessage());
return;
[4/6] mesos git commit: Don't crash the agent when an unknown
executor re-registers.
Posted by bm...@apache.org.
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/3f029d04
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3f029d04
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3f029d04
Branch: refs/heads/master
Commit: 3f029d04d163c1a793e1cb8337b051f031b7a89f
Parents: 0d0af7a
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 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3f029d04/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 3865d2a..2835fc2 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4022,7 +4022,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:
[6/6] mesos git commit: Removed a use of the 'default' switch case.
Posted by bm...@apache.org.
Removed a use of the 'default' switch case.
For enums, we instead rely on the compiler to warn us when we
miss a switch case. With the presence of the 'default' case,
this doesn't occur.
Review: https://reviews.apache.org/r/59591
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b6b23443
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b6b23443
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b6b23443
Branch: refs/heads/master
Commit: b6b23443a393bb31ab7730f43f6bcd017ffc8c51
Parents: 3f029d0
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 15:25:42 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b6b23443/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 2835fc2..2eb9034 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4149,10 +4149,6 @@ void Slave::reregisterExecutor(
// should be shutdown if it hasn't received any tasks.
break;
}
- default:
- LOG(FATAL) << "Executor " << *executor << " is in unexpected state "
- << executor->state;
- break;
}
}
[5/6] mesos git commit: Avoided use of [] operator for read only map
access.
Posted by bm...@apache.org.
Avoided use of [] operator for read only map access.
Review: https://reviews.apache.org/r/59593
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5c178b34
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5c178b34
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5c178b34
Branch: refs/heads/master
Commit: 5c178b34fb15871779c7c1f6e093ef133f1a8d2a
Parents: 610321a
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 16:52:29 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5c178b34/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 6a2f521..bd84bc5 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -4010,7 +4010,7 @@ void Slave::reregisterExecutor(
return;
}
- Framework* framework = frameworks[frameworkId];
+ Framework* framework = frameworks.at(frameworkId);
CHECK(framework->state == Framework::RUNNING ||
framework->state == Framework::TERMINATING)
[3/6] mesos git commit: Added logging of executor re-registration
messages.
Posted by bm...@apache.org.
Added logging of executor re-registration messages.
Review: https://reviews.apache.org/r/59592
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/610321a8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/610321a8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/610321a8
Branch: refs/heads/master
Commit: 610321a86a182719ca4234e79f2cb09a08884643
Parents: b6b2344
Author: Benjamin Mahler <bm...@apache.org>
Authored: Thu May 25 16:49:22 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 16:29:44 2017 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/610321a8/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 2eb9034..6a2f521 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3988,6 +3988,10 @@ void Slave::reregisterExecutor(
state == RUNNING || state == TERMINATING)
<< state;
+ LOG(INFO) << "Received re-registration message from"
+ << " executor '" << executorId << "'"
+ << " of framework " << frameworkId;
+
if (state == TERMINATING) {
LOG(WARNING) << "Shutting down executor '" << executorId << "'"
<< " of framework " << frameworkId