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

cgv1: do not disable cpuset manager if reserved interface already exists #16467

Merged
merged 2 commits into from
Mar 13, 2023

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Mar 13, 2023

This PR fixes a bug where restarting a Nomad Client on a machine using cgroups
v1 (e.g. Ubuntu 20.04 or earlier) would cause the cpuset cgroups manager to disable itself.

This is being caused by incorrectly interpreting a "file exists" error as
problematic when ensuring the reserved cpuset exists. If we get a "file exists"
error, that just means there is nothing to do, and the cpuset manager should continue
initializing normally.

Note that a machine reboot would fix the issue - the interfaces are ephemeral.

Fixes #16291

This PR fixes a bug where restarting a Nomad Client on a machine using cgroups
v1 (e.g. Ubuntu 20.04) would cause the cpuset cgroups manager to disable itself.

This is being caused by incorrectly interpreting a "file exists" error as
problematic when ensuring the reserved cpuset exists. If we get a "file exists"
error, that just means the Client was likely restarted.

Note that a machine reboot would fix the issue - the groups interfaces are
ephemoral.
@shoenig
Copy link
Member Author

shoenig commented Mar 13, 2023

spot check

ubuntu@ip-172-31-19-2:~$ grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 20.04.5 LTS"

After Nomad Client restart,

2023-03-13T19:56:22.242Z [INFO]  client.cpuset.v1: initialized cpuset cgroup manager: parent=/nomad cpuset=0-1
2023-03-13T19:56:22.254Z [INFO]  client.fingerprint_mgr.cgroup: cgroups are available

@shoenig shoenig added backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line labels Mar 13, 2023
@shoenig shoenig added the backport/1.3.x backport to 1.3.x release line label Mar 13, 2023
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line backport/1.5.x backport to 1.5.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit "resources.cores" does not work after nomad client restart
3 participants