podman run --device-cgroup-rule option is not honored #10302
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When
--device-cgroup-rule=b 7:* rmw
option is passed topodman run
command along withCAP_MKNOD
capability, the container is expected to be able to setup loop devices. However, podman is not honoring the option. The same option works with Docker.Steps to reproduce the issue:
Start a podman container with
--device-cgroup-rule=b 7:* rmw --device /dev/loop-control:/dev/loop-control:rwm --cap-add CAP_MKNOD
option.Log into the container (
podman exec -it <container-name> bash
)Create a virtual block device using
dd
command and apply file-system usingmkfs -t xfs
Create a loop device using
mknod
commandAttach the virtual block device using
losetup
commandDescribe the results you received:
losetup
fails with "failed to set up loop device: Operation not permitted" error.Describe the results you expected:
The
losetup
should work as it happens in case of DockerAdditional information you deem important (e.g. issue happens only occasionally):
Consistent
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Red Hat Enterprise Linux 8.4 Beta
VMware virtual machine
The text was updated successfully, but these errors were encountered: