Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 1671921[details]
reproducer
This bug may be used for documentation purposes only, and closed, if you wish.
It originally caused bug in mock, so we resolved it in mock PR [1].
When you do
$ mount --rbind -o rprivate root bootstrap_root/root
.. only the top-most mount from ./root is bind-mounted to
bootstrap_root/root, not the sub-mounts like ./root/sub-mount.
This works fine on Fedora box.
Try the attached reproducer:
# bash ./reproducer
...
# findmnt --raw | cut -d' ' -f1 | grep /tmp/
/tmp/root
/tmp/bootstrap_root
/tmp/root/cache_submount
/tmp/bootstrap_root/root
It means that /tmp/bootstrap_root/root/cache_submount is missing.
[1] https://github.com/rpm-software-management/mock/pull/536
Sounds like bug #1584443. Unfortunately, not fixed on RHEL-7 (but fixed in RHEL>=8).
The best workaround is to split the "mount --rbind -o rprivate" command into two separate mount commands to be compatible with old versions.
Upstream commites:
4ebea84bb1ca6b0fa817588aba13de26c8d5e5a0
816773b475900909d42c2c8282a6ac50252cac22
6691d53797ccc2e5ac840c5b1680fceaa23122db
Not sure if we really need it in RHEL-7 as it's a chance to relatively sensitive stuff and no reported by customers.
Closing. Please, reopen if really need it. Thanks!
(In reply to David Ward from comment #3)
> @Karel: no this is not fixed in RHEL 8, which also has util-linux 2.32.1
> without a patch for this.
Ah, now I see what do you mean (for RHEL-8)
The problem is not the feature itself, but the flag MS_REC which is not applied to
the first mount(2) call. It was originally reported for Fedora (bug #1584443) and
fixed by upstream commit 816773b475900909d42c2c8282a6ac50252cac22.
# strace -e mount mount --rbind -o rprivate /mnt/test /mnt/test
mount("/mnt/test", "/mnt/test", 0x5607fc749960, MS_MGC_VAL|MS_BIND, NULL) = 0
mount("none", "/mnt/test", NULL, MS_REC|MS_PRIVATE, NULL) = 0
the same on Fedora:
# strace -e mount mount --rbind -o rprivate /mnt/test /mnt/test
mount("/mnt/test", "/mnt/test", 0x55c2efb1ec80, MS_BIND|MS_REC, NULL) = 0
mount("none", "/mnt/test", NULL, MS_REC|MS_PRIVATE, NULL) = 0
For RHEL-7 it's really too invasive (as there is missing all the code), but for RHEL-8
it's something we can fix in the 8.5 -- I'll clone this issue.
Thanks for your patience ;-)