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 2014/09/09 01:02:44 UTC
git commit: Added kill() to freezerTimedOut() in cgroups.cpp. This is
a short-term fix for MESOS-1758.
Repository: mesos
Updated Branches:
refs/heads/master 18d3957f2 -> 63ed98634
Added kill() to freezerTimedOut() in cgroups.cpp.
This is a short-term fix for MESOS-1758.
Review: https://reviews.apache.org/r/25457
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/63ed9863
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/63ed9863
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/63ed9863
Branch: refs/heads/master
Commit: 63ed98634444f927beb2cf074aacc838fb601329
Parents: 18d3957
Author: Vinod Kone <vi...@gmail.com>
Authored: Mon Sep 8 15:40:54 2014 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 8 15:41:59 2014 -0700
----------------------------------------------------------------------
src/linux/cgroups.cpp | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/63ed9863/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index c6464ab..5093b4c 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1372,7 +1372,7 @@ public:
}
if (state.get() == "FROZEN") {
- LOG(INFO) << "Successfullly froze cgroup "
+ LOG(INFO) << "Successfully froze cgroup "
<< path::join(hierarchy, cgroup)
<< " after " << (Clock::now() - start);
promise.set(Nothing());
@@ -1479,18 +1479,21 @@ protected:
private:
static Future<Nothing> freezeTimedout(
Future<Nothing> future,
- const PID<TasksKiller>& pid,
- const string& hierarchy,
- const string& cgroup)
+ const PID<TasksKiller>& pid)
{
// Cancel the freeze operation.
// TODO(jieyu): Wait until 'future' is in DISCARDED state before
// starting retry.
future.discard();
- // Thaw the cgroup before trying to freeze again to allow any
+ // We attempt to kill the processes before we thaw again,
+ // due to a bug in the kernel. See MESOS-1758 for more details.
+ // We thaw the cgroup before trying to freeze again to allow any
// pending signals to be delivered. See MESOS-1689 for details.
- return cgroups::freezer::thaw(hierarchy, cgroup)
+ // This is a short term hack until we have PID namespace support.
+ return Future<bool>(true)
+ .then(defer(pid, &Self::kill))
+ .then(defer(pid, &Self::thaw))
.then(defer(pid, &Self::freeze));
}
@@ -1510,12 +1513,7 @@ private:
// away from freezer once we have pid namespace support.
return cgroups::freezer::freeze(hierarchy, cgroup).after(
FREEZE_RETRY_INTERVAL,
- lambda::bind(
- &freezeTimedout,
- lambda::_1,
- self(),
- hierarchy,
- cgroup));
+ lambda::bind(&freezeTimedout, lambda::_1, self()));
}
Future<Nothing> kill()