Skip to content

Commit

Permalink
[cgroups2] Do DEBUG container check after creating cgroup for it.
Browse files Browse the repository at this point in the history
Since we create cgroups for all containers, we will create the DEBUG
container. We expect the DEBUG containers to not have its own resource
contraints, so we will return __prepare early before reaching the
CHECK.

Review: https://reviews.apache.org/r/75172/
  • Loading branch information
ZhouJas authored and bmahler committed Aug 15, 2024
1 parent 721ce90 commit 65d246f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ Future<Option<ContainerLaunchInfo>> Cgroups2IsolatorProcess::prepare(
" has already been prepared");
}

CHECK(containerConfig.container_class() != ContainerClass::DEBUG);

// Based on MESOS-9305, there seems to be a possibility that the root
// folder may be deleted underneath us. Since we make use of subtree_control
Expand Down Expand Up @@ -232,6 +231,12 @@ Future<Option<ContainerLaunchInfo>> Cgroups2IsolatorProcess::prepare(
infos[containerId] = Owned<Info>(
new Info(containerId, nonLeafCgroup, leafCgroup, !shareCgroups));

if (shareCgroups) {
return __prepare(containerId, containerConfig);
}

CHECK(containerConfig.container_class() != ContainerClass::DEBUG);

vector<Future<Nothing>> prepares;
hashset<string> skip_enable = {"core", "perf_event", "devices"};
foreachvalue (const Owned<Controller>& controller, controllers) {
Expand Down

0 comments on commit 65d246f

Please sign in to comment.