cf-natali commented on a change in pull request #388:
URL: https://github.com/apache/mesos/pull/388#discussion_r654577345
##########
File path: src/linux/cgroups.cpp
##########
@@ -1425,16 +1424,15 @@ class TasksKiller : public Process<TasksKiller>
const PID<TasksKiller>& pid)
{
// Cancel the freeze operation.
- // TODO(jieyu): Wait until 'future' is in DISCARDED state before
- // starting retry.
future.discard();
- // 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.
- // This is a short term hack until we have PID namespace support.
- return Future<bool>(true)
+ // Wait until the freeze is cancelled, and then 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. This is a short term hack until we have PID namespace support.
+ return future
+ .recover([](const Future<Nothing>&){ return Future<Nothing>(Nothing());
})
Review comment:
Hm, no?
We won't return, we carry on with the 3 methods below. I confirmed it by
looking at logs.
The `[](const Future<Nothing>&){ return Future<Nothing>(Nothing()); }` is
basically just a no-op in order to be able to call `recover`.
Is there a simpler way?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]