snap revert doesn't do anything with snaps that use assumes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Low
|
Unassigned |
Bug Description
When installing a snap, we check that the current version of snapd is sufficient to satisfy the assumes in the snap.yaml, but nothing is done when we revert snapd to an earlier version.
For example with `assumes: [snapd2.41]` and a snap that uses `snapctl set-health`, if I install the snap under snapd 2.42.4, the snap works correctly. Then if I revert snapd to 2.39.4, the snap is left as is, even though it is effectively broken. See:
```
ubuntu@
snap 2.42.4
snapd 2.42.4
series 16
kernel 4.15.0-72-generic
ubuntu@
my-snap-name 0.1 installed
ubuntu@
ubuntu@
0
ubuntu@
2019-12-
snapd reverted to 2.39.2
ubuntu@
Name Version Rev Tracking Publisher Notes
my-snap-name 0.1 x1 - - -
ubuntu@
error: error running snapctl: Unknown command `set-health'. Please specify one command of: get, restart, services, set, start or stop
ubuntu@
snap 2.39.2
snapd 2.39.2
series 16
kernel 4.15.0-72-generic
```
I would have expected either snaps with assumes higher than the current revision to be marked as broken at least or possibly fully disabled when we go to revert snapd. This is a harmless example, but if we had something like network-manager depend on a snapd version and it failed then reverting snapd would break that snap and thus break the system.
Changed in snapd: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in snapd: | |
importance: | High → Low |