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 2155189 - mounts are not propagated into namespaces
Summary: mounts are not propagated into namespaces
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kernel
Version: 9.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 9.0
Assignee: Alexey Gladkov
QA Contact: Chao Ye
URL:
Whiteboard:
Depends On:
Blocks: 2151869
TreeView+ depends on / blocked
 
Reported: 2022-12-20 11:10 UTC by Michal Privoznik
Modified: 2023-01-02 12:41 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2151869
Environment:
Last Closed: 2023-01-02 12:41:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-142953 0 None None None 2022-12-20 11:14:09 UTC

Description Michal Privoznik 2022-12-20 11:10:36 UTC
+++ This bug was initially created as a clone of Bug #2151869 +++

--- Additional comment from Michal Privoznik on 2022-12-20 11:24:28 CET ---

Indeed. There's something terribly broken (in kernel perhaps?):

kernel-5.14.0-212.el9.x86_64
systemd-252-2.el9.x86_64

1) just to make sure mount events are being propagated:

# mount --make-rshared /

2) check hugetlbfs mounts:

# mount | grep huge
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)

3) in another terminal, unshare mount namespace:

# unshare -m

4) verify that the hugetlbfs is mounted (from inside the NS):

# mount | grep huge
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)

5) now, mount another hugetlbfs (from the parent NS, NOT the one just unshared):

# mount -t hugetlbfs -o pagesize=1G hugetlbfs /dev/hugepages1G

6) verify the mount got propagated (from the NS):

# mount | grep huge
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)


Therefore, this is completely independent of libvirt and should be reported against kernel for further investigation. Then, we can revisit our bug.

Comment 2 Michal Privoznik 2022-12-21 07:57:23 UTC
Setting TestBlocker keyword since this is blocking verification of the original bug.

Comment 3 Alexey Gladkov 2023-01-02 12:41:31 UTC
(In reply to Michal Privoznik from comment #0)
> 1) just to make sure mount events are being propagated:
> 
> # mount --make-rshared /
> 
> 2) check hugetlbfs mounts:
> 
> # mount | grep huge
> hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)
> 
> 3) in another terminal, unshare mount namespace:
> 
> # unshare -m

Let's stop at this step.

From unshare(1) manpage:
```
unshare since util-linux version 2.27 automatically sets propagation to private in a new mount namespace to make sure that the new namespace is really unshared. It’s possible to disable this feature with option --propagation unchanged. Note that private is the kernel default.
```

If I run the command with the option, all subsequent steps work as you would expect:

# unshare --mount --propagation unchanged

> Therefore, this is completely independent of libvirt and should be reported
> against kernel for further investigation. Then, we can revisit our bug.

I don't know anything about the original bug, but the steps from the description is fully consistent with the behavior described in the documentation.


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