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

cgroup: do not fail with missing cpuset file #1135

Merged

Conversation

giuseppe
Copy link
Member

if cpuset.cpus[.effective] file is missing, then ignore the error
since it means the cpuset controller is not enabled in the kernel,
rather than returning an error.

Closes: #1134

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

@martinetd
Copy link
Contributor

Cheers, thanks! I'll give it a spin on Monday or Tuesday, well into weekend time in my timezone, but it's very likely it'll work as advertised from what I can see. 👍

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Aug 26, 2022

/lgtm
/hold

// is not enabled in the kernel.
if os.IsNotExist(err) {
return nil, nil
}
return nil, fmt.Errorf("open %s: %w", path, err)
Copy link
Member

Choose a reason for hiding this comment

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

Sadly I believe this is a stutter, but not worth a repush.

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, the final message here from getting this error is "Failed to add conmon to cgroupfs sandbox cgroup: open /sys/fs/cgroup/libpod_parent/conmon/cpuset.cpus: open /sys/fs/cgroup/libpod_parent/conmon/cpuset.cpus.effective: no such file or directory" so it looks ok to me

@martinetd
Copy link
Contributor

Just tested (a trivial backport for 4.1.1) of this PR, it works like a charm. Both warning is gone (obviously) and other cgroups loaded successfully.

Thanks!

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2022

@giuseppe needs a rebase.

if cpuset.cpus[.effective] file is missing, then ignore the error
since it means the cpuset controller is not enabled in the kernel,
rather than returning an error.

Closes: containers#1134

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the cpuset-missing-no-error branch from 2871cf1 to 87fe560 Compare August 30, 2022 08:45
@openshift-ci openshift-ci bot removed the lgtm label Aug 30, 2022
@giuseppe
Copy link
Member Author

rebased

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, giuseppe, martinetd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@giuseppe
Copy link
Member Author

fine to merge?

@rhatdan
Copy link
Member

rhatdan commented Sep 2, 2022

/lgtm
/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 5e745fc into containers:main Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make the cpuset cgroup optional
5 participants