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/04/22 22:45:10 UTC
mesos git commit: Clarified several agent log messages.
Repository: mesos
Updated Branches:
refs/heads/master 7ae4f20fd -> 31496dd51
Clarified several agent log messages.
When diagnosing problems, it can be useful to distinguish
between executors that are "terminating" vs. "terminated".
Review: https://reviews.apache.org/r/46391/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/31496dd5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/31496dd5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/31496dd5
Branch: refs/heads/master
Commit: 31496dd51eb122db6286de5a7fb2614c81612720
Parents: 7ae4f20
Author: Neil Conway <ne...@gmail.com>
Authored: Fri Apr 22 13:44:54 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Apr 22 13:44:54 2016 -0700
----------------------------------------------------------------------
src/slave/slave.cpp | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/31496dd5/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index a365e8f..ebf2606 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1829,10 +1829,18 @@ void Slave::_runTask(
switch (executor->state) {
case Executor::TERMINATING:
case Executor::TERMINATED: {
+ string executorState;
+
+ if (executor->state == Executor::TERMINATING) {
+ executorState = "terminating";
+ } else {
+ executorState = "terminated";
+ }
+
LOG(WARNING) << "Asked to run task '" << task.task_id()
<< "' for framework " << frameworkId
<< " with executor '" << executorId
- << "' which is terminating/terminated";
+ << "' which is " << executorState;
const StatusUpdate update = protobuf::createStatusUpdate(
frameworkId,
@@ -1841,7 +1849,7 @@ void Slave::_runTask(
TASK_LOST,
TaskStatus::SOURCE_SLAVE,
UUID::random(),
- "Executor terminating/terminated",
+ "Executor " + executorState,
TaskStatus::REASON_EXECUTOR_TERMINATED);
statusUpdate(update, UPID());
@@ -2173,10 +2181,14 @@ void Slave::killTask(
break;
}
case Executor::TERMINATING:
+ LOG(WARNING) << "Ignoring kill task " << taskId
+ << " because the executor " << *executor
+ << " is terminating";
+ break;
case Executor::TERMINATED:
LOG(WARNING) << "Ignoring kill task " << taskId
<< " because the executor " << *executor
- << " is terminating/terminated";
+ << " is terminated";
break;
case Executor::RUNNING: {
if (executor->queuedTasks.contains(taskId)) {
@@ -4411,11 +4423,17 @@ void Slave::shutdownExecutor(
executor->state == Executor::TERMINATED)
<< executor->state;
- if (executor->state == Executor::TERMINATING ||
- executor->state == Executor::TERMINATED) {
+ if (executor->state == Executor::TERMINATING) {
+ LOG(WARNING) << "Ignoring shutdown executor '" << executorId
+ << "' of framework " << frameworkId
+ << " because the executor is terminating";
+ return;
+ }
+
+ if (executor->state == Executor::TERMINATED) {
LOG(WARNING) << "Ignoring shutdown executor '" << executorId
<< "' of framework " << frameworkId
- << " because the executor is terminating/terminated";
+ << " because the executor is terminated";
return;
}