This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 2117d7802 [cgroups2] Handle unknown containers in watch().
2117d7802 is described below
commit 2117d780291102b247b338f80a07c9b41b930f50
Author: Jason Zhou <[email protected]>
AuthorDate: Fri Aug 16 13:56:17 2024 -0400
[cgroups2] Handle unknown containers in watch().
In cgroups1, we returned a pending future for containers that shared
cgroups with their parents.
In cgroups2, since we always create cgroups for our containers, we no
longer need to consider this special case. So we only return failure
if there is an unknown container.
Review: https://reviews.apache.org/r/75176/
---
src/slave/containerizer/mesos/isolators/cgroups2/cgroups2.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/slave/containerizer/mesos/isolators/cgroups2/cgroups2.cpp
b/src/slave/containerizer/mesos/isolators/cgroups2/cgroups2.cpp
index 12842a055..1f054626d 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups2/cgroups2.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups2/cgroups2.cpp
@@ -694,9 +694,9 @@ Future<Nothing> Cgroups2IsolatorProcess::_isolate(
Future<ContainerLimitation> Cgroups2IsolatorProcess::watch(
const ContainerID& containerId)
{
- // TODO(dleamy): Revisit this once nested containers are implemented. We
- // may want to do what is done in cgroups v2 where we return a pending future
- // for child containers that share cgroups with their ancestor.
+ if (!infos.contains(containerId)) {
+ return Failure("Unknown container");
+ }
foreachvalue (const Owned<Controller>& controller, controllers) {
if (infos[containerId]->controllers.contains(controller->name())) {