Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use kernel mount of squashfs if running privledged. #361

Merged

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Dec 13, 2022

If stacker build is being run as "real root", then use a kernel mount rather than using squashfuse.

What does this PR do / Why do we need it: Maybe we dont. It seems unreasonable to hamstring root into only doing fuse mounts when he/she could have the kernel do them.

I expect some discussion would be needed here. I'm thinking that maybe environment variable configuration to turn this on or off would be useful. Maybe default to fuse and allow the root user of stacker to use kernel mounts by setting STACKER_SQUASHFS_KERNEL_MOUNTS=true . or something.

@smoser smoser force-pushed the feature/root-kernel-squash-mounts branch from 1093459 to bf68312 Compare December 13, 2022 19:05
squashfs/squashfs.go Outdated Show resolved Hide resolved
@smoser smoser force-pushed the feature/root-kernel-squash-mounts branch from bf68312 to fe1eac4 Compare December 14, 2022 22:36
squashfs/squashfs.go Outdated Show resolved Hide resolved
@rchincha rchincha added this to the v0.40.1 milestone Dec 14, 2022
Try to mount a squashfs image with a kernel mount.
This should be faster than squashfuse mount, but will only
work if we are host root.

Environment variable STACKER_ALLOW_SQUASHFS_KERNEL_MOUNTS can
control whether or not kernel mounts can be tried.
It defaults to 'true', but if it is set to 'false', then no
attempt will be made.

Signed-off-by: Scott Moser <[email protected]>
@smoser smoser force-pushed the feature/root-kernel-squash-mounts branch from fe1eac4 to b592695 Compare December 15, 2022 01:19
@rchincha rchincha merged commit dc0ada0 into project-stacker:main Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants