yesterday our CI boxes refreshed to latest snapd 2.37. We have two snaps important to build our software installed: go, snapcraft
Everything is being build from jenkins as user jenkins whichs HOME directory is /var/lib/jenkins. Since today various commands fail with the following error:
cannot create user data directory: /var/lib/jenkins/snap/go/3129: Permission denied
Thanks for your report. The technical reason for this issue is that we removed the āquirksā handling in the snap-confine code. This code used to require that we allow snap-confine to write to /var/lib/. So this worked for you by luck. Now of course if things break for you that is bad and we need to look into this.
We could restore the old apparmor profile for snap-confine - this would give it more permissions that it should have. Not sure if @jdstrand like this.
Sorry for the trouble @adam.stokes ! The fix is now in the ācandidateā channel for core. Could you please snap refresh --candidate core and let us know if that fixes things for you?
Same for @morphis - The fix is now in the ācandidateā channel for core. Could you please snap refresh --candidate core and let us know if that fixes things for you?
We would also like to encourage people to run candidate if possible in some of their deployments. We do a lot of testing before updates hit candidate so generally they are good - and as this incident shows, sometimes even stable has regressions. Having more real-world workloads on candidate would help minimize those (but I understand of course that its tricky and everyone is wary of the risk).
The wal-e snap is also broken, breaking all PostgreSQL charm deployments configured to use WAL archiving for disaster recovery. As of the automatic update to 2.37, WAL archiving stopped working, and disk partitions started filling. SREs have been reverting the core update to fire fight, but this is obviously not a long term fix. Affected systems include the snap store and related databases.
wal-e is a classic snap, generally run as the āpostgresā user with $HOME /var/lib/postgresql.
Thanks for reporting this - we will fix this ASAP. The background here is that we had /var/lib/ writeable for snap-confine. Because postgresql is using /var/lib/postgresql we broke that too Sorry! Technically this is a bugfix but of course breaking existing software is unacceptable so we will find a solution for this one too (either via special case or by reverting the entire fix).
Yes, the issue here is not the confinement of the snap, but the confinement of snapd own trampolines, and the fact that these are non /home/* home directories.