snapctl got confused and forgot about set-health
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
I don't have logs for this anymore because unfortunately this happened during a demo and we just needed to unblock it to finish showing the demo, but the basic sequence of things was this:
1. Boot default UC18 image using multipass, snapd is at 2.39.2 (revision 3646)
2. Refresh all the snaps
3. Snapd snap is now on stable 2.42.4
3. Attempt to install a snap that uses `snapctl set-health` in the configure hook
4. Installation fails because `snapctl set-health` wasn't a recognized command:
error: error running snapctl: Unknown command `set-health'. Please specify one command of: get, restart, services, set, start or stop
5. We revert snapd to 3646 with `snap revert snapd`, still doesn't work (though in retrospect this particular failure was expected, see below note)
6. We reboot the VM, still doesn't work
7. We refresh snapd to edge, now `snapctl set-health` works (without a reboot as well)
I think what happened is that somehow the snapctl tool from the snapd snap was out of date, but I can't say for sure.
This particular snap does not declare a minimum snapd version with `assumes`, so it definitely should for at least 2.41 when health checks were supported, but regardless this seems to have been a situation where supposedly a new enough snapd was installed but snapctl was talking to an old snapd somehow.
Changed in snapd: | |
importance: | Undecided → Medium |
Changed in snapd: | |
status: | New → Triaged |
this probably relates to this known issue: https:/ /forum. snapcraft. io/t/injecting- snapd-tools- into-base- snaps-and- keeping- them-up- to-date/ 12139