Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raw_exec: don't use cgroups when no_cgroup is set #9328

Merged
merged 3 commits into from
Nov 11, 2020
Merged

raw_exec: don't use cgroups when no_cgroup is set #9328

merged 3 commits into from
Nov 11, 2020

Conversation

notnoop
Copy link
Contributor

@notnoop notnoop commented Nov 11, 2020

When raw_exec is configured with no_cgroups, raw_exec shouldn't attempt to create a cgroup.

Prior to this change, we accidentially always required freezer cgroup to do stats PID tracking. We already have the proper fallback in place for metrics, so only need to ensure that we don't create a cgroup for the task.

I've added the tests in a commit first. You can see the failure in https://app.circleci.com/pipelines/github/hashicorp/nomad/13091/workflows/b2d02203-1a9b-4c46-92b1-7b35e58ed63a/jobs/117359 where freezer cgroup differed from expected.

Fixes #8565

Mahmood Ali added 2 commits November 11, 2020 15:17
Test that the universal executor (used for raw_exec) avoids using
cgroup when `no_cgroup` is a cgroup
@notnoop notnoop self-assigned this Nov 11, 2020
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

[ci skip]
@notnoop notnoop merged commit bd745fa into master Nov 11, 2020
@notnoop notnoop deleted the b-gh-8565 branch November 11, 2020 21:20
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nomad can no longer launch commands with raw_exec if /sys/fs/cgroup does not exist (old kernels)
2 participants