tests: add check that removal of snaps works with user data
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.
@zyga the test is showing a real issue, is it not?
@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.
@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.
I think we can explore fixing this after we're done with our roadmap tasks. In real terms it might land in Ubuntu by the end of the year.
@zyga Any news ? This has been a nasty bug for Firefox users for the last three years and I know it blocked deployment in some places.