snapctl got confused and forgot about set-health

Bug #1856050 reported by Ian Johnson
6
This bug affects 1 person
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.

Revision history for this message
Samuele Pedroni (pedronis) wrote :
Changed in snapd:
importance: Undecided → Medium
Changed in snapd:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.