You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2017/11/14 12:44:39 UTC
[1/4] mesos git commit: Updated the comments of TASK_FINISHED to make
it more clear.
Repository: mesos
Updated Branches:
refs/heads/1.3.x fa1d61003 -> 022e52405
Updated the comments of TASK_FINISHED to make it more clear.
Review: https://reviews.apache.org/r/62685
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5da5ace2
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5da5ace2
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5da5ace2
Branch: refs/heads/1.3.x
Commit: 5da5ace2f7abdf8ecc158d9c1a8b875f43be9591
Parents: fa1d610
Author: Qian Zhang <zh...@gmail.com>
Authored: Fri Sep 29 15:28:58 2017 +0800
Committer: Qian Zhang <zh...@gmail.com>
Committed: Tue Nov 14 17:26:22 2017 +0800
----------------------------------------------------------------------
include/mesos/mesos.proto | 4 +++-
include/mesos/v1/mesos.proto | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5da5ace2/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index fa23dc9..23207eb 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -1700,7 +1700,9 @@ enum TaskState {
// the TASK_KILLING_STATE capability.
TASK_KILLING = 8; // The task is being killed by the executor.
- TASK_FINISHED = 2; // TERMINAL: The task finished successfully.
+ // The task finished successfully on its own without external interference.
+ TASK_FINISHED = 2; // TERMINAL.
+
TASK_FAILED = 3; // TERMINAL: The task failed to finish successfully.
TASK_KILLED = 4; // TERMINAL: The task was killed by the executor.
TASK_ERROR = 7; // TERMINAL: The task description contains an error.
http://git-wip-us.apache.org/repos/asf/mesos/blob/5da5ace2/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 564b5f0..31e841b 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -1694,7 +1694,9 @@ enum TaskState {
// the TASK_KILLING_STATE capability.
TASK_KILLING = 8; // The task is being killed by the executor.
- TASK_FINISHED = 2; // TERMINAL: The task finished successfully.
+ // The task finished successfully on its own without external interference.
+ TASK_FINISHED = 2; // TERMINAL.
+
TASK_FAILED = 3; // TERMINAL: The task failed to finish successfully.
TASK_KILLED = 4; // TERMINAL: The task was killed by the executor.
TASK_ERROR = 7; // TERMINAL: The task description contains an error.
[2/4] mesos git commit: Always send TASK_KILLED when the task is
killed by a framework.
Posted by qi...@apache.org.
Always send TASK_KILLED when the task is killed by a framework.
This change is done for command, docker and default executors.
Review: https://reviews.apache.org/r/62326
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b320e2fc
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b320e2fc
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b320e2fc
Branch: refs/heads/1.3.x
Commit: b320e2fc73498f97931aa48785a22ae90a33b4de
Parents: 5da5ace
Author: Qian Zhang <zh...@gmail.com>
Authored: Thu Sep 14 17:29:39 2017 +0800
Committer: Qian Zhang <zh...@gmail.com>
Committed: Tue Nov 14 17:26:23 2017 +0800
----------------------------------------------------------------------
src/docker/executor.cpp | 6 +++---
src/launcher/default_executor.cpp | 6 +++---
src/launcher/executor.cpp | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b320e2fc/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index c6f50fa..79cd4e5 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -495,9 +495,7 @@ private:
CHECK(WIFEXITED(status) || WIFSIGNALED(status))
<< "Unexpected wait status " << status;
- if (WSUCCEEDED(status)) {
- state = TASK_FINISHED;
- } else if (killed) {
+ if (killed) {
// Send TASK_KILLED if the task was killed as a result of
// kill() or shutdown(). Note that in general there is a
// race between signaling the container and it terminating
@@ -507,6 +505,8 @@ private:
// determine whether the container was terminated via
// our signal or terminated on its own.
state = TASK_KILLED;
+ } else if (WSUCCEEDED(status)) {
+ state = TASK_FINISHED;
} else {
state = TASK_FAILED;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/b320e2fc/src/launcher/default_executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/default_executor.cpp b/src/launcher/default_executor.cpp
index 81aa6e4..3c6f220 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -773,12 +773,12 @@ protected:
CHECK(WIFEXITED(status) || WIFSIGNALED(status))
<< "Unexpected wait status " << status;
- if (WSUCCEEDED(status)) {
- taskState = TASK_FINISHED;
- } else if (container->killing) {
+ if (container->killing) {
// Send TASK_KILLED if the task was killed as a result of
// `killTask()` or `shutdown()`.
taskState = TASK_KILLED;
+ } else if (WSUCCEEDED(status)) {
+ taskState = TASK_FINISHED;
} else {
taskState = TASK_FAILED;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/b320e2fc/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index b05f73e..61c1512 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -891,12 +891,12 @@ private:
CHECK(WIFEXITED(status) || WIFSIGNALED(status))
<< "Unexpected wait status " << status;
- if (WSUCCEEDED(status)) {
- taskState = TASK_FINISHED;
- } else if (killed) {
+ if (killed) {
// Send TASK_KILLED if the task was killed as a result of
// kill() or shutdown().
taskState = TASK_KILLED;
+ } else if (WSUCCEEDED(status)) {
+ taskState = TASK_FINISHED;
} else {
taskState = TASK_FAILED;
}
[4/4] mesos git commit: Added MESOS-7975 to the 1.3.2 CHANGELOG.
Posted by qi...@apache.org.
Added MESOS-7975 to the 1.3.2 CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/022e5240
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/022e5240
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/022e5240
Branch: refs/heads/1.3.x
Commit: 022e5240523986f4a3ae938516b0c73c14576a40
Parents: 9417078
Author: Qian Zhang <zh...@gmail.com>
Authored: Tue Nov 14 17:29:49 2017 +0800
Committer: Qian Zhang <zh...@gmail.com>
Committed: Tue Nov 14 17:29:49 2017 +0800
----------------------------------------------------------------------
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/022e5240/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 6ef0a0e..a2c913d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,7 @@ All Issues:
* [MESOS-7912] - Master WebUI not working in Chrome.
* [MESOS-7926] - Abnormal termination of default executor can cause MesosContainerizer::destroy to fail.
* [MESOS-7934] - OOM due to LibeventSSLSocket send incorrectly returning 0 after shutdown.
+ * [MESOS-7975] - The command/default/docker executor can incorrectly send a TASK_FINISHED update even when the task is killed.
* [MESOS-8051] - Killing TASK_GROUP fail to kill some tasks.
* [MESOS-8080] - The default executor does not propagate missing task exit status correctly.
* [MESOS-8135] - Masters can lose track of tasks' executor IDs.
[3/4] mesos git commit: Checked TASK_KILLED in the test
`ROOT_INTERNET_CURL_PortMapper`.
Posted by qi...@apache.org.
Checked TASK_KILLED in the test `ROOT_INTERNET_CURL_PortMapper`.
Review: https://reviews.apache.org/r/62327
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/94170788
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/94170788
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/94170788
Branch: refs/heads/1.3.x
Commit: 941707881795dc5ea63e581ca6a646bed8fae93d
Parents: b320e2f
Author: Qian Zhang <zh...@gmail.com>
Authored: Thu Sep 14 17:33:05 2017 +0800
Committer: Qian Zhang <zh...@gmail.com>
Committed: Tue Nov 14 17:26:23 2017 +0800
----------------------------------------------------------------------
src/tests/containerizer/cni_isolator_tests.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/94170788/src/tests/containerizer/cni_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cni_isolator_tests.cpp b/src/tests/containerizer/cni_isolator_tests.cpp
index 565e58a..1f410ec 100644
--- a/src/tests/containerizer/cni_isolator_tests.cpp
+++ b/src/tests/containerizer/cni_isolator_tests.cpp
@@ -1420,13 +1420,7 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INTERNET_CURL_PortMapper)
AWAIT_READY(statusKilled);
- // The executor would issue a SIGTERM to the container, followed by
- // a SIGKILL (in case the container ignores the SIGTERM). The
- // "nginx:alpine" container returns an "EXIT_STATUS" of 0 on
- // receiving a SIGTERM making the executor send a `TASK_FINISHED`
- // instead of a `TASK_KILLED`, hence checking for `TASK_FINISHED`
- // instead of `TASK_KILLED`.
- EXPECT_EQ(TASK_FINISHED, statusKilled.get().state());
+ EXPECT_EQ(TASK_KILLED, statusKilled.get().state());
AWAIT_READY(gcSchedule);