mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
The reset_all_snaps code will get confused if the state contains disabled snaps. The reason is that importing `reset.sh` will remove all disabled snaps first. Then the `reset_all_snaps` will call `restore_snapd_state` which will restore the state and the snaps but the mount unit of the removed snaps are not re-started so the snap appears to be broken. This happens on e.g. the external testflinger devices when the device starts with a stable core20, then refreshes to a core20 from beta. In that configuration the `tests.invariant` test will detect a broken core20 revision because of the above behavior. There are various ways to fix this, the easiest is to just start with a snapd state that contains no disabled snaps on core systems.