snap restore breaks sudo snap commands
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
New
|
Undecided
|
Unassigned |
Bug Description
I was following these instructions https:/
sudo maas config --show --show-
cannot create user data directory: /root/snap/
But at the same time this command works:
sudo snap run --shell maas -c true; echo $?
cannot create user data directory: /root/snap/
1
The folder does exist:
sudo ls -l /root/snap/maas
total 8
drwxr-xr-x 2 root root 4096 Mar 16 09:45 25850
drwxr-xr-x 2 root root 4096 Mar 14 18:50 common
lrwxrwxrwx 1 root root 5 Feb 27 09:31 current -> 25850
This command hangs indefinitely:
sudo apparmor_parser
journalctl output is here: https:/
maas.cli apparmor profile: https:/
maas.maas apparmor profile: https:/
maas.supervisor apparmor profile: https:/
Workaround:
After rebooting the MAAS machine it becomes alive and the command runs:
$ sudo maas config --show --show-
Mode: region+rack
Settings:
maas_url=http://
database_
database_port=None
database_name=maas
database_
database_
Steps to reproduce:
sudo -u postgres pg_dumpall -c > ~/dump.sql
sudo systemctl stop postgresql.service
sudo snap save maas
sudo snap remove --purge maas
sudo systemctl start postgresql.service
sudo -u postgres psql -f dump.sql postgres
sudo snap restore <snapshot-id>
sudo maas config --show --show-
Uh, super sorry about the slow reply and also about the incorrect "apparmor_parsr" question - this should have been "apparmor_status".