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

Back by popular demand CAP_SYS_CHROOT #1373

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Mar 20, 2023

We are getting a lot of issues on our removal of CAP_SYS_CHROOT from the default list of capabilities used by Podman, so adding it back until we do a major release.

This capabilty is also needed to successfully run the quay.io/buildah/stable image with Podman.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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

@rhatdan
Copy link
Member Author

rhatdan commented Mar 20, 2023

@vrothberg @nalind @Luap99 PTAL

@@ -387,6 +387,10 @@ image_copy_tmp_dir="storage"`
gomega.Expect(config.Engine.NumLocks).To(gomega.BeEquivalentTo(2048))
gomega.Expect(config.Engine.OCIRuntimes["runc"]).To(gomega.Equal(OCIRuntimeMap["runc"]))
gomega.Expect(config.Containers.CgroupConf).To(gomega.BeNil())

caps, _ := config.Capabilities("", nil, nil)
gomega.Expect(strings.Join(caps, ",")).Should(gomega.ContainSubstring("CAP_SYS_CHROOT"))
Copy link
Member

Choose a reason for hiding this comment

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

Should this also be checking for each of the rest of the items in the expected default set?

Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea. To be extra sure we're not regressing in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

We do check that above, but that is using the internal list from the code. Do you want to hard code the list again in the test to make sure users change it in both places?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for pushing. Can we get this in today and cut a release? Need to backport it to Podman v4.4 branch for the release on Thursday.

@vrothberg vrothberg mentioned this pull request Mar 21, 2023
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

We are getting a lot of issues on our removal of CAP_SYS_CHROOT
from the default list of capabilities used by Podman, so adding
it back until we do a major release.

This capabilty is also needed to successfully run the
quay.io/buildah/stable image with Podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member Author

rhatdan commented Mar 21, 2023

@vrothberg @nalind PTAL

@nalind
Copy link
Member

nalind commented Mar 21, 2023

Pretty sure I don't have the privs in this repository, but:
/lgtm

@vrothberg
Copy link
Member

You do :) With great power, comes great responsibility.

Thanks! I can cut a release tomorrow and take care of vendoring unless @rhatdan beats me to it :)

@openshift-merge-robot openshift-merge-robot merged commit 28ebcc6 into containers:main Mar 21, 2023
@TomSweeneyRedHat
Copy link
Member

Is there an associated BZ for this for RHEL? I don't see one, and this should not have been put into the v0.51 branch without one..... @rhatdan @vrothberg

@Luap99
Copy link
Member

Luap99 commented Mar 31, 2023

@TomSweeneyRedHat This discussion was stared because of RHEL. I think @jnovy already patched the containers.conf downstream to address it so this should not change anything.
I see at least https://bugzilla.redhat.com/show_bug.cgi?id=2166195 and https://bugzilla.redhat.com/show_bug.cgi?id=2178263

@vrothberg
Copy link
Member

It's OK to be in the v0.51 branch. This is used for upstream Podman and is not used in Podman v4.4.1-rhel branch. It's not in RHEL.

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.

6 participants