RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2094875 - podman not being able to mount devices during podman build
Summary: podman not being able to mount devices during podman build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.5
Hardware: All
OS: All
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Joy Pu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-08 14:12 UTC by Harsh Modi
Modified: 2022-11-08 09:33 UTC (History)
14 users (show)

Fixed In Version: podman-4.1.1-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:15:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers buildah issues 4002 0 None closed podman build cannot mount devices, while podman run can. 2022-06-08 14:12:25 UTC
Github containers buildah pull 4014 0 None Merged buildah: add support for renaming a device in rootless setups using `--device` 2022-06-15 09:01:29 UTC
Github containers podman pull 14848 0 None Merged [v4.1.1-rhel backport] vendor: bump buildah to `v1.26.1` -> `v1.26.2` 2022-07-14 10:47:37 UTC
Red Hat Issue Tracker RHELPLAN-124648 0 None None None 2022-06-08 14:31:32 UTC
Red Hat Product Errata RHSA-2022:7457 0 None None None 2022-11-08 09:16:27 UTC

Description Harsh Modi 2022-06-08 14:12:26 UTC
Description of problem:
Podman is not able to mount devices for `podman build` however it does so for `podman run`. In OSBS 2.0 we need `podman-remote build` to be able to mount devices for supporting flatpak builds.

We filed https://github.com/containers/buildah/issues/4002 to get the problem fix and it is fixed upstream we need to get it backported to RHEL 8 so that we can use it for our builders that run on RHEL 8.

Version-Release number of selected component (if applicable):
podman-3.4.2

How reproducible:
Always

Steps to Reproduce:
1.Try `podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null`
2.
3.

Actual results:
Renaming devices is not allowed for rootless containers. Device not available at `/var/tmp/flatpak-build/dev/null`

Expected results:
Device available at `/var/tmp/flatpak-build/dev/null`

Additional info:
Previous we built using docker which had higher privileges and we were able to `cp -a /dev/null /var/tmp/flatpak-build/dev/null` but in rootless podman it's not possible so we need to mount it.

We also tried mounting the devices using ``podman build --no-cache --volume=/dev/null:/var/tmp/flatpak-build/dev/null` but that doesn't work for use since we build for different architectures using `podman-remote` and `podman-remote` doesn't do anything for `podman-remote --remote --connection podman-connection build --no-cache --volume=/dev/null:/var/tmp/flatpak-build/dev/null`.

Comment 1 Tom Sweeney 2022-06-08 20:09:51 UTC
This will be fixed in Podman v4.1.1, which will be available in RHEL 8.6.0.2 in early August.  @dornelas thoughts on doing a backport?  At this point with RHEL 8.5, I think we could only do a hotfix and, if so, we'd need a strong business reason for doing so.

Comment 20 Joy Pu 2022-07-22 15:19:37 UTC
Can reproduce podman-4.1.0-3.module+el8.7.0+15271+4011683a.x86_64:
[test@kvm-04-guest03 ~]$ podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null .
Error: error creating build executor: Renaming device /dev/null to /var/tmp/flatpak-build/dev/null is not supported in rootless containers

And test with podman-4.1.1-6.module+el8.7.0+15895+a6753917.x86_64. It works as expected. So set this to verified. Details:
[test@dell-per430-27 ~]$ podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null .
STEP 1/3: FROM quay.io/libpod/busybox
STEP 2/3: RUN ls -l /var/tmp/flatpak-build/dev/
total 0
crw-rw-rw-    1 nobody   nobody      1,   3 Jul 19 12:23 null
--> 56ca0e7f4d3
STEP 3/3: RUN echo hello > /var/tmp/flatpak-build/dev/null
COMMIT
--> 5cbc2e31b92
5cbc2e31b928401445190a7af44777c55b1988235f284f276415deee5449331d

Comment 22 errata-xmlrpc 2022-11-08 09:15:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7457


Note You need to log in before you can comment on or make changes to this bug.