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

tests: add check that removal of snaps works with user data #14053

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NucciTheBoss
Copy link

Test adds check to see if https://bugs.launchpad.net/snapd/+bug/2002697 is easily reproducible when using home directories exported via NFSv3 or NFSv4.

This issue is easily reproducible on HPC deployments where NFS is used as the shared filesystem for exporting data across the cluster. Snaps can be installed and used by "remote users" - defined in LDAP and not in /etc/passwd - but they cannot be refreshed an/or removed when root_squash is enabled as snapshotting SNAP_USER_DATA and SNAP_USER_COMMON is disallowed by the filesystem.

See LP#:2002697

Signed-off-by: Jason C. Nucciarone <[email protected]>
Copy link
Collaborator

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

Thank you

@bboozzoo bboozzoo requested a review from zyga June 7, 2024 06:34
@bboozzoo
Copy link
Collaborator

bboozzoo commented Jun 7, 2024

@zyga the test is showing a real issue, is it not?

@zyga
Copy link
Collaborator

zyga commented Jun 7, 2024

@zyga the test is showing a real issue, is it not?

Yes. I discussed this on the chat and suggested opening this PR to show what is broken.

@NucciTheBoss
Copy link
Author

@zyga the test is showing a real issue, is it not?

Yes, the test is meant to show that you cannot remove snaps when user /home directories are exported as an NFS share, specifically when root_squash is enabled as an export option for the NFS share. NFS will "anonymize" (reassign root to a different configured uid and gid) the uid and gid of the snapd process when snapd goes to snapshot SNAP_USER_DATA and SNAP_USER_COMMON in the users' home directory. Since snapd no longer has permission to perform operations within user home directories, it fails to remove or refresh the snap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants