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 2018/09/05 21:49:04 UTC
[mesos] branch 1.6.x updated (918504e -> bf5e39f)
This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a change to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.
from 918504e Added MESOS-9189 to the 1.6.2 CHANGELOG.
new 172254a Made command check always waits before removing the nested container.
new 4ebafb6 Made checker library retry to remove the previous check container.
new bf5e39f Added MESOS-8568 to the 1.6.2 CHANGELOG.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGELOG | 1 +
src/checks/checker_process.cpp | 25 ++++++++++++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
[mesos] 03/03: Added MESOS-8568 to the 1.6.2 CHANGELOG.
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a commit to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit bf5e39f99aa82728831bca969445ffd94a2d216d
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Wed Sep 5 14:43:31 2018 -0700
Added MESOS-8568 to the 1.6.2 CHANGELOG.
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index 2123ef4..dacc2d7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ Release Notes - Mesos - Version 1.6.2 (WIP)
** Bug
* [MESOS-8418] - mesos-agent high cpu usage because of numerous /proc/mounts reads.
+ * [MESOS-8568] - Command checks should always call `WAIT_NESTED_CONTAINER` before `REMOVE_NESTED_CONTAINER`
* [MESOS-8917] - Agent leaking file descriptors into forked processes
* [MESOS-8921] - Autotools don't work with newer OpenJDK versions
* [MESOS-9116] - Launch nested container session fails due to incorrect detection of `mnt` namespace of command executor's task.
[mesos] 02/03: Made checker library retry to remove the previous
check container.
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a commit to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 4ebafb6bd77eb70e8d270343ea4c3b7c3ad152f3
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Wed Aug 29 11:22:41 2018 +0800
Made checker library retry to remove the previous check container.
Previously when checker library fails to remove the previous check
container, it will discard the promise and launch a new check container
which will cause two problems:
1. The discarded promise is used to launch the new check container,
that means even the new check container is launched successfully,
we still have no chance to process its check result since the
promise has already been discarded.
2. The previous check container will never get a chance to be removed
which is leak, i.e., its runtime directory and sandbox directory
will not be removed.
Now in this patch, when checker library fails to remove the previous
check container, we make it remove the previous check container again.
Review: https://reviews.apache.org/r/68555
---
src/checks/checker_process.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/checks/checker_process.cpp b/src/checks/checker_process.cpp
index ea432c1..23722a7 100644
--- a/src/checks/checker_process.cpp
+++ b/src/checks/checker_process.cpp
@@ -658,10 +658,10 @@ Future<int> CheckerProcess::nestedCommandCheck(
<< " the " << name << " for task '" << taskId << "'";
promise->discard();
+ } else {
+ previousCheckContainerId = None();
+ _nestedCommandCheck(promise, cmd, nested);
}
-
- previousCheckContainerId = None();
- _nestedCommandCheck(promise, cmd, nested);
}));
} else {
_nestedCommandCheck(promise, cmd, nested);
[mesos] 01/03: Made command check always waits before removing the
nested container.
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a commit to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 172254aaf0fffd21c17ab85c7d9040b6e3762064
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Thu Aug 23 17:44:53 2018 +0800
Made command check always waits before removing the nested container.
Review: https://reviews.apache.org/r/68495
---
src/checks/checker_process.cpp | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/checks/checker_process.cpp b/src/checks/checker_process.cpp
index 36eadb1..ea432c1 100644
--- a/src/checks/checker_process.cpp
+++ b/src/checks/checker_process.cpp
@@ -795,7 +795,19 @@ void CheckerProcess::___nestedCommandCheck(
<< launchResponse.body << ") while launching " << name
<< " for task '" << taskId << "'";
- promise->discard();
+ // We'll try to remove the container created for the check at the
+ // beginning of the next check. In order to prevent a failure, the
+ // promise should only be completed once we're sure that the
+ // container has terminated.
+ waitNestedContainer(checkContainerId, nested)
+ .onAny([promise](const Future<Option<int>>&) {
+ // We assume that once `WaitNestedContainer` returns,
+ // irrespective of whether the response contains a failure, the
+ // container will be in a terminal state, and that it will be
+ // possible to remove it.
+ promise->discard();
+ });
+
return;
}
@@ -881,7 +893,10 @@ void CheckerProcess::nestedCommandCheckFailure(
//
// This will allow us to recover from a blip. The executor will
// pause the checker when it detects that the agent is not
- // available.
+ // available. Here we do not need to wait the check container since
+ // the agent may have been unavailable, and when the agent is back,
+ // it will destroy the check container as orphan container, and we
+ // will eventually remove it in `nestedCommandCheck()`.
LOG(WARNING) << "Connection to the agent to launch " << name
<< " for task '" << taskId << "' failed: " << failure;