Skip to content

cephadm-e2e: ensure crun + chmod libvirt socket for rootless podman#2590

Open
afreen23 wants to merge 2 commits into
ceph:mainfrom
afreen23:fix-cephadm-e2e
Open

cephadm-e2e: ensure crun + chmod libvirt socket for rootless podman#2590
afreen23 wants to merge 2 commits into
ceph:mainfrom
afreen23:fix-cephadm-e2e

Conversation

@afreen23
Copy link
Copy Markdown
Contributor

--group-add keep-groups requires crun as the OCI runtime; runc silently ignores it. Install crun explicitly and chmod the libvirt socket as a fallback so the mapped UID inside rootless podman can always connect. Also removes newgrp which is unreliable inside non-interactive scripts.

afreen23 added 2 commits May 27, 2026 05:13
--group-add keep-groups requires crun as the OCI runtime; runc silently
ignores it.  Install crun explicitly and chmod the libvirt socket as a
fallback so the mapped UID inside rootless podman can always connect.
Also removes newgrp which is unreliable inside non-interactive scripts.

Signed-off-by: Afreen Misbah <afreen@ibm.com>
sudo creates the kcli SSH key as root:root and the image pool directory
as root:root. Inside rootless podman the container's uid 0 maps to
jenkins-build (uid 1000) on the host, so the kernel denies access to
root-owned files. Drop sudo from ssh-keygen and chown the image pool
directory so both are owned by the build user and readable/writable
inside the container's user namespace.

Signed-off-by: Afreen Misbah <afreen@ibm.com>
@afreen23 afreen23 marked this pull request as ready for review May 27, 2026 00:05
@afreen23
Copy link
Copy Markdown
Contributor Author

afreen23 commented May 27, 2026

The kcli root issues are gone- kcli setup completed successfully https://jenkins.ceph.com/job/ceph-dashboard-cephadm-e2e/22829/console

previous run: https://jenkins.ceph.com/job/ceph-dashboard-cephadm-e2e/22719/consoleFull

This PR fixes only kcli installation, for complete job running need this fix as well ceph/ceph#69116 (comment)

@afreen23 afreen23 requested a review from nizamial09 May 27, 2026 00:05
# --group-add keep-groups (crun) preserves them, but only if crun is the
# OCI runtime. As a robust fallback, also widen socket permissions so the
# mapped UID can connect regardless of group membership.
sudo chmod 0666 /var/run/libvirt/libvirt-sock
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i am a bit skeptical about elevating this permission. why not just use the crun as the runtime for podman by passing --runtime crun to the podman command instead of elevating the sock permissions? would that fix the issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess I was just debugging and became so aggressive with the fix , did not refine code, good point will try that.

@tchaikov
Copy link
Copy Markdown
Contributor

@afreen23 hi Afreen, does this change address the issue at https://tracker.ceph.com/issues/76929 ?

@afreen23
Copy link
Copy Markdown
Contributor Author

@afreen23 hi Afreen, does this change address the issue at https://tracker.ceph.com/issues/76929 ?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants