My lxd zpool not showing and I cannot start any container after a crash

Hi I was editing an lxd config file while my system crashed. After the reboot
zpool list does not list lxd and I cannot start any container. I get the following error:

cat: /proc/self/attr/current: Permission denied
/snap/lxd/17886/commands/lxc: 6: exec: aa-exec: Permission denied

looking at /var/snap/lxd/common/lxd/disks/lxd.image is still there.

I am not sure if it is related, but the crash was after upgrading from kernel 5.4.0-48-generic to 5.4.0-51-generic

Does anyone have any idea who to recover from that.

rolling back to

rpool/ROOT/ubuntu_mj0kfs/var/snap_autozsys_yjgrj5 did not fix the issue.

Any help will be appreciated.

Thanks

The Permission denied suggests a snapd issue.

Can you try running snap refresh lxd see if that updates it and gets things back online?
Also please show snap list.

Before I got your answer, I found this, which fixed the issue.

snap connect lxd:lxd-support core:lxd-support
systemctl restart snap.lxd.daemon

Since I am not expert in snaps, is this equivalent to snap refresh?

Ah, excellent!
The snap refresh may have caused a similar effect.

In your case the issue wasn’t that the apparmor profile was corrupted or missing in some way but instead that snapd apparently wasn’t told by the store to connect our special interface. Without that interface, LXD is unable to do much anything and so fails with that error.

Glad you’re back online!