fix: fall back to fusermount when /dev/fuse is inaccessible#1
Merged
Merged
Conversation
fuse_mount_sys already falls back to fusermount on mount(2) EPERM, but returns a hard error when DevFuse::open() fails. This means unprivileged containers that lack /dev/fuse but have a (possibly proxied) fusermount binary never reach the fallback path. Return Ok(None) on NotFound/PermissionDenied from DevFuse::open() so the caller retries via fusermount, matching the mount(2) behavior.
f8addf8 to
bb271e3
Compare
This was referenced Apr 28, 2026
Member
|
Can you push this on upstream fuser ? I would like to push my commit too |
Member
|
Merging for now |
XciD
added a commit
to huggingface/hf-mount
that referenced
this pull request
May 21, 2026
## Summary Bumps the pinned `fuser` SHA on the `sidecar-multi-fd` branch of `huggingface/fuser` to pick up [PR #1](huggingface/fuser#1), which makes `fuse_mount_pure` fall back to `fusermount` when `DevFuse::open()` returns `NotFound` or `PermissionDenied`. Previously the fallback path only fired on `mount(2) EPERM`, so an inaccessible `/dev/fuse` (typical in unprivileged Kubernetes pods) bailed out hard before fusermount was ever tried. Closes #147. Unblocks [skypilot-org/skypilot#9418](skypilot-org/skypilot#9418). ## Verification Reproduced on an AL2023 EC2 box by `chmod 0` on `/dev/fuse` (simulating an unprivileged container with no device access): Before: ``` ERROR Permission denied: mounting a FUSE filesystem requires root privileges. Try running with: sudo ... ERROR FUSE mount failed: Permission denied (os error 13) ``` After (with the bumped fuser): ``` ERROR FUSE mount failed: fusermount: failed to open /dev/fuse: Permission denied ``` The error provenance shifts from the direct `DevFuse::open` path to `fusermount`, confirming the fallback is now taken. In a real unprivileged-Kubernetes setup where fusermount is proxied to a privileged host context (as SkyPilot does), this path succeeds end-to-end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`fuse_mount_sys` already falls back to fusermount on `mount(2)` EPERM, but returns a hard error when `DevFuse::open()` fails. This means unprivileged containers that lack `/dev/fuse` but have a (possibly proxied) fusermount binary never reach the fallback path.
This returns `Ok(None)` on `NotFound`/`PermissionDenied` from `DevFuse::open()` so the caller retries via fusermount, matching the `mount(2)` behavior.