Skip to content

cephadm: bind host rootfs with rslave propagation - #72965

Merged
vshankar merged 4 commits into
ceph:mainfrom
vshankar:wip-vshankar-upgrade-fuse-umount-debug
Oct 28, 2026
Merged

vshankar merged 4 commits into
ceph:mainfrom
vshankar:wip-vshankar-upgrade-fuse-umount-debug

Conversation

@vshankar

Copy link
Copy Markdown
Contributor

OSD and node-exporter containers recursively bind mount the host's / at /rootfs using the default (rprivate) propagation. Every mount that exists on the host when such a container starts gets copied into the container's mount namespace and host umounts never propagatex to it.

fusermount -u detaches the host's copy, but the fuse connection stays alive until the container stops, so ceph-fuse never sees the unmount and never exits. This is hit in fs:upgrade suites where the upgrade redeploys OSDs and node-exporter after ceph-fuse has mounted.

Manual debugging (scanning /proc/*/mountinfo for the fuse device right after fusermount -u) confirmed this: the mount was gone from the host mount table but the fuse connection was still alive, and the mount namespaces of the redeployed osd.{0,1,2} and node-exporter containers still held the ceph-fuse mount at /rootfs/ with private propagation.

mnt:[4026533286] pid=101758 comm=podman-init cmdline=/run/podman-init -- /usr/bin/ceph-osd -n osd.2 -f --setuser ceph --setgroup ceph --default-log-to-file=false --default-log-to-journald=true --default-log-to-stderr=false --osd-objectstore=bluestore
1301 1229 0:43 / /rootfs/home/ubuntu/cephtest/mnt.0 rw,nosuid,nodev,relatime - fuse.ceph-fuse ceph-fuse rw,user_id=0,group_id=0,allow_other

With that hint, a tiny LLM query pointed to check rslave vs. rprivate flags for kernel mount propogation types and that led me to check the cephadm source and finally the aha moment.

Use rslave (as ceph-volume already does) so host (u)mounts propagate into the containers.

Assisted-by: Gemini
Fixes: http://tracker.ceph.com/issues/64502

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@vshankar
vshankar requested review from a team October 22, 2026 05:24
@vshankar
vshankar requested review from adk3798 and rkachach October 22, 2026 05:26
@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins test rook e2e

@vshankar

Copy link
Copy Markdown
Contributor Author

Once this change is approved, I will re-enable ceph-fuse testing in mds_upgrade_sequence and get rid of upgrade_fuse (which we introduced to track the failure to reduce failure noise from mds_upgrade_sequence due to this umount hang bug).

@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins test api

@dparmar18

Copy link
Copy Markdown
Contributor

wow, all this drama from a mount propagation flag...

@dparmar18 dparmar18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM and i'm glad we are finally putting an end to this. Thanks!

@vshankar

Copy link
Copy Markdown
Contributor Author

@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins test rook e2e

@rkachach
rkachach requested a review from guits October 22, 2026 10:02
@rkachach

Copy link
Copy Markdown
Contributor

Thanks @vshankar for the fix. Could you plz add some UT to cover the new flag?

@vshankar

Copy link
Copy Markdown
Contributor Author

Thanks @vshankar for the fix. Could you plz add some UT to cover the new flag?

I will check. In the meantime can you confirm the cephadm and orch e2e CI test failures are unrelated to this change?

@batrick batrick left a comment

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.

Way to go Venky (and Gemini)! Such a relief.

OSD and node-exporter containers recursively bind mount the host's /
at /rootfs using the default (rprivate) propagation. Every mount that
exists on the host when such a container starts gets copied into the
container's mount namespace and host umounts never propagatex to it.

`fusermount -u` detaches the host's copy, but the fuse connection stays
alive until the container stops, so ceph-fuse never sees the unmount and
never exits. This is hit in fs:upgrade suites where the upgrade redeploys
OSDs and node-exporter after ceph-fuse has mounted.

Manual debugging (scanning /proc/*/mountinfo for the fuse device right
after fusermount -u) confirmed this: the mount was gone from the host
mount table but the fuse connection was still alive, and the mount
namespaces of the redeployed osd.{0,1,2} and node-exporter containers
still held the ceph-fuse mount at /rootfs/<mntpt> with private
propagation.

  mnt:[4026533286] pid=101758 comm=podman-init cmdline=/run/podman-init -- /usr/bin/ceph-osd -n osd.2 -f --setuser ceph --setgroup ceph --default-log-to-file=false --default-log-to-journald=true --default-log-to-stderr=false --osd-objectstore=bluestore
  1301 1229 0:43 / /rootfs/home/ubuntu/cephtest/mnt.0 rw,nosuid,nodev,relatime - fuse.ceph-fuse ceph-fuse rw,user_id=0,group_id=0,allow_other

With that hint, a tiny LLM query pointed to check rslave vs. rprivate
flags for kernel mount propogation types and that led me to check the
cephadm source and finally the aha moment.

Use rslave (as ceph-volume already does) so host (u)mounts propagate
into the containers.

Assisted-by: Gemini
Fixes: http://tracker.ceph.com/issues/64502
Signed-off-by: Venky Shankar <[email protected]>
Assert that the generated podman command line bind mounts the host's
/ at /rootfs with rslave propagation for OSD (rslave) and
node-exporter (ro,rslave) containers, so that a revert to the default
rprivate propagation (which pins host mounts such as ceph-fuse inside
the container) gets caught. Adds a deploy test for node-exporter,
which had none.

Fixes: https://tracker.ceph.com/issues/64502
Signed-off-by: Venky Shankar <[email protected]>
The fuse client facet was rejected (tracker 76780) because ceph-fuse
would not exit after unmount once the cluster was upgraded. That was
OSD and node-exporter containers, redeployed by the upgrade after the
client mounted, pinning the FUSE mount via a privately propagated bind
of the host rootfs. With cephadm now binding / with rslave propagation,
the fuse jobs can run again.

Fixes: https://tracker.ceph.com/issues/64502
Signed-off-by: Venky Shankar <[email protected]>
upgrade_fuse was split out (tracker 76780) to keep tracking the
ceph-fuse unmount failure while fuse jobs were rejected from
mds_upgrade_sequence. Now that the cause is fixed and the fuse client
facet is enabled there again, this sub-suite is redundant.

Fixes: https://tracker.ceph.com/issues/64502
Signed-off-by: Venky Shankar <[email protected]>
@vshankar
vshankar force-pushed the wip-vshankar-upgrade-fuse-umount-debug branch from d20b864 to 2fb7d10 Compare October 22, 2026 14:57
@vshankar
vshankar requested a review from a team as a code owner October 22, 2026 14:57
@github-actions github-actions Bot added the tests label Oct 22, 2026
@vshankar

Copy link
Copy Markdown
Contributor Author

Changes with latest update:

  • Added unit tests (@rkachach)
  • removed upgrade_fuse sub-suite and enabled fuse client testing with mds_upgrade_sequence

Sample test run for mds_upgrade_sequence: https://pulpito.ceph.com/vshankar-2026-10-22_14:14:48-fs:upgrade:mds_upgrade_sequence-wip-vshankar-upgrade-fuse-umount-debug-1-distro-default-trial/

The upgrade-from-squid test failures is due to a bug in squid and is being discussed here: https://ceph-storage.slack.com/archives/C0AL09J5CBT/p1792680531914369

I will schedule some upgrade-from-tentacle, fuse client only test jobs.

@vshankar

Copy link
Copy Markdown
Contributor Author

@rkachach rkachach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@vshankar

Copy link
Copy Markdown
Contributor Author

This PR has been added to main integration testing by vshankar started 2026-10-27-04:37.

@rkachach

Copy link
Copy Markdown
Contributor

@rkachach

Copy link
Copy Markdown
Contributor

orch suite run for this PR was good: https://pulpito.ceph.com/rkachach-2026-10-26_17:41:09-orch:cephadm-wip-rkachach-testing-2026-10-26-1551-distro-default-trial/

fs suite will finish running tomorrow. I see orch:mds_upgrade_sequence failed: https://pulpito.ceph.com/rkachach-2026-10-26_17:41:09-orch:cephadm-wip-rkachach-testing-2026-10-26-1551-distro-default-trial/677418

Do we know why?

This test case normally is flaky and it fails in most of the runs so I don't trust it TBH. I think @kginonredhat had a PR which tries to fix it.

@vshankar

Copy link
Copy Markdown
Contributor Author

@vshankar
vshankar merged commit c673335 into ceph:main Oct 28, 2026
16 of 18 checks passed
@vshankar

Copy link
Copy Markdown
Contributor Author

orch suite run for this PR was good: https://pulpito.ceph.com/rkachach-2026-10-26_17:41:09-orch:cephadm-wip-rkachach-testing-2026-10-26-1551-distro-default-trial/

fs suite will finish running tomorrow. I see orch:mds_upgrade_sequence failed: https://pulpito.ceph.com/rkachach-2026-10-26_17:41:09-orch:cephadm-wip-rkachach-testing-2026-10-26-1551-distro-default-trial/677418
Do we know why?

This test case normally is flaky and it fails in most of the runs so I don't trust it TBH. I think @kginonredhat had a PR which tries to fix it.

https://tracker.ceph.com/issues/82265 -- the test ran with inline data enabled which CephFS has dropped support for. I will work with the kernel driver maintainers to possibly stop testing that bit.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants