I found an interesting bug this morning:
zyga@t470:~$ sudo snap refresh
[sudo] hasło użytkownika zyga:
2018-04-03T08:57:20+02:00 INFO Waiting for restart...
error: cannot perform the following tasks:
- Run configure hook of "lxd" snap if present (run hook "configure": error: cannot communicate with server: Post http://localhost/v2/snapctl: dial unix /run/snapd-snap.socket: connect: no such file or directory)
What just happened is that snapd refreshed from 2.32.1 to 2.32.2 and restarted, during that window LXD snap refreshed concurrently and failed to chat with snapd using snapctl.
I think we should make core (or anything that carries snapd in the future, in general) refresh first, completely, before attempting refreshes on remaining snaps. In general this makes is robust against this issue and should also ensure assumes: snapdXY
tags can be safely used without confusing error messages.