Repository navigation
Conversation
dfuse needs FUSE_CAP_ALLOW_IDMAP to allow idmapped mounts (Linux 6.12 and later), which containers in user namespaces use, e.g. Kubernetes pods with "hostUsers: false". libfuse has it since commit 1f4c0608, which is not in a release yet. fused v1.0.0 (a libfuse snapshot before 3.17) cannot express it: the flag is bit 32 of the capabilities, which libfuse only has from 3.17 on, as the 64-bit want_ext set with fuse_set_feature_flag(). Update fused to v1.1.0 (libfuse 3.17.4) and carry the libfuse change in deps/patches/fused, as for other dependencies: - 0001: libfuse d393ffa8 "Synchronize fuse_kernel.h with linux-6.14", which adds FUSE_ALLOW_IDMAP. It cherry-picks onto v1.1.0 without conflicts. - 0002: libfuse 1f4c0608 "add FUSE_CAP_ALLOW_IDMAP (daos-stack#1446)", backported to 3.17.4 as described in the patch. The flag is only sent to the kernel when a filesystem requests it, so nothing changes unless dfuse is started with --allow-idmap. The patches can be dropped once fused or upstream libfuse (DAOS-18222) has the change. Features: dfuse Signed-off-by: Dmitry Polonsky <ifnotelse@gmail.com>
|
Ticket title is 'dfuse: support idmapped mounts for containers in user namespaces' |
6 tasks
6 tasks
This branch has not been deployed
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.
Why
dfuse --allow-idmap(#19404) lets containers in user namespaces use dfuse mounts. It needsFUSE_CAP_ALLOW_IDMAP, for example for Kubernetes pods withhostUsers: false.1f4c0608,
which is not in a release yet.
capabilities, and libfuse only has 64-bit capabilities from 3.17 on (
want_ext, set withfuse_set_feature_flag()). Bit 31, the last one of the 32-bit field, isFUSE_CAP_OVER_IO_URINGupstream.Without this PR,
--allow-idmaphas no effect: dfuse only logs that the fuse library does notsupport idmapped mounts. #19404 can be merged before or without this PR.
Change
deps/patches/fused, the way patches for mercury, spdk andargobots are carried. Both patches keep the upstream author and commit message.
0001_fuse_kernel_h_linux_6.14.patch:d393ffa8 "Synchronize fuse_kernel.h with
linux-6.14". It adds
FUSE_ALLOW_IDMAPand cherry-picks onto v1.1.0 without conflicts; thepatch is the export of that cherry-pick, so only its hunk offsets differ from the commit.
0002_fuse_cap_allow_idmap.patch: 1f4c0608 "add FUSE_CAP_ALLOW_IDMAP (DAOS-2185 continer: fix for snapshot creation #1446)", backportedto 3.17.4. The note at the end of its commit message describes the backport:
fuse_lowlevel.chunks differs. The io-uring lines next to the firstone are left out, because 3.17 has no io-uring support.
FUSE_INIT_EXTis handled, as upstream. Otherwise the flagwould not reach
flags2.BuildRequires: fused-devel >= 1.1.0(dfuse's#ifdefwould otherwise silently drop the option in a build against an older fused-devel), daos
2.9.100-9, and changelogs. The release goes from 7 to 9 because the changelog on master already
has 2.9.100-8 (DAOS-19763) while
daos.specstill says 7.The flag is only sent to the kernel when a filesystem requests it, so nothing changes unless dfuse
is started with
--allow-idmap. The patches can be dropped once fused or upstream libfuse has thechange (DAOS-18222, daos-stack/fused#11). If it goes into fused itself: the v1.1.0 tag still
carries
fused.specanddebian/changelogat 1.0.0-3, which DAOS does not use(
utils/rpms/fused.shandpackage_info.shset the version).If you would rather get there through upstream libfuse (#17784), I can redo this PR on top of it:
the backport then is a single patch, which applies to libfuse 3.18.2 and 3.18.3 (the header sync is
already part of 3.18).
A plain update to v1.1.0 was tried before in #16879 and closed after functional test failures.
The PR does not say what failed, and it was based on another work-in-progress branch
(
jvolivie/fpm_spdk). With v1.1.0, NLT passes (see Testing). The functional test results of thisPR will show whether an issue remains.
Testing
DAOS master 58d0485 with this PR and #19404, EL9 RPMs and
scons install(lab build,31.10.2026). The validation of the dependency RPMs and the comparison of the fused sources were
done on an earlier base (0dbc4dd) with the same
deps/patches/fusedandbuild.configchanges.git apply.build_packages.sh --build-range=depsbuilds fused-devel 1.1.0-1, which hasFUSE_CAP_ALLOW_IDMAP, and all 31 dependency RPMs pass validation (on 0dbc4dd).test_il_allow_idmapof DAOS-19898 dfuse: Add an option to allow idmapped mounts #19404 on Linux 7.2 and logs thatidmapped mounts were allowed.
with
--allow-idmapforced on every dfuse.DAOS-19898 dfuse: Add an option to allow idmapped mounts #19404. Each test ran twice, with and without
--allow-idmapon every dfuse, and gave the sameresult both times.
--allow-idmap:test_bashfd_pil4dfsand the libaio fio step oftest_bashcmd_pil4dfs*also fail on masterwith fused v1.0.0 (checked on 0dbc4dd), and
test_bashcmdandtest_bashcmd_ioilend with acurlof a host on the CI network, afterall their file system steps have passed. Details are in DAOS-19898 dfuse: Add an option to allow idmapped mounts #19404.
dfuse_testpasses in all 4 cache modes without the interception libraries, and in the 3modes other than writeback (as in ftest) with them.
fusermount3(fuse3 3.16.2),in foreground and in daemon mode;
--allow-idmap: idmapped mounts work on Linux 7.2 and 6.18, including Kubernetes podswith
hostUsers: false. Details are in DAOS-19898 dfuse: Add an option to allow idmapped mounts #19404.Features: dfuse
Steps for the author:
After all prior steps are complete: