Seems to be a bug introduced with 2.67(.1 ?) as it was working before.
I have a snap with services running in daemon: simple
. It is in install-mode: disable
and refresh-mode
is default value (so restart
)
I perform a refresh to a new revision (from rev 127 to rev 128), with no big changes.
Then service ends up in state inactive
, while snap changes
says the services were restarted.
Status Spawn Ready Summary
Done today at 11:40 UTC today at 11:40 UTC Ensure prerequisites for "charmed-mongodb" are available
Done today at 11:40 UTC today at 11:40 UTC Prepare snap "/var/lib/snapd/snaps/charmed-mongodb_128.snap" (128)
Done today at 11:40 UTC today at 11:40 UTC Run pre-refresh hook of "charmed-mongodb" snap if present
Done today at 11:40 UTC today at 11:40 UTC Stop snap "charmed-mongodb" services
Done today at 11:40 UTC today at 11:40 UTC Remove aliases for snap "charmed-mongodb"
Done today at 11:40 UTC today at 11:40 UTC Make current revision for snap "charmed-mongodb" unavailable
Done today at 11:40 UTC today at 11:40 UTC Copy snap "charmed-mongodb" data
Done today at 11:40 UTC today at 11:40 UTC Setup snap "charmed-mongodb" (128) security profiles
Done today at 11:40 UTC today at 11:40 UTC Make snap "charmed-mongodb" (128) available to the system
Done today at 11:40 UTC today at 11:40 UTC Automatically connect eligible plugs and slots of snap "charmed-mongodb"
Done today at 11:40 UTC today at 11:40 UTC Set automatic aliases for snap "charmed-mongodb"
Done today at 11:40 UTC today at 11:40 UTC Setup snap "charmed-mongodb" aliases
Done today at 11:40 UTC today at 11:40 UTC Run post-refresh hook of "charmed-mongodb" snap if present
Done today at 11:40 UTC today at 11:40 UTC Start snap "charmed-mongodb" (128) services
Done today at 11:40 UTC today at 11:40 UTC Clean up "charmed-mongodb" (128) install
Done today at 11:40 UTC today at 11:40 UTC Run configure hook of "charmed-mongodb" snap if present
Done today at 11:40 UTC today at 11:40 UTC Run health check of "charmed-mongodb" snap
Done today at 11:40 UTC today at 11:40 UTC Monitoring snap "charmed-mongodb" to determine whether extra refresh steps are required
Running journalctl -u snapd
I see:
Apr 02 11:40:36 juju-4af4d5-2 snapd[13103]: services.go:1152: RemoveSnapServices - disabling snap.charmed-mongodb.mongodb-exporter.service
Apr 02 11:40:36 juju-4af4d5-2 snapd[13103]: services.go:1152: RemoveSnapServices - disabling snap.charmed-mongodb.pbm-agent.service
Apr 02 11:40:36 juju-4af4d5-2 snapd[13103]: services.go:1152: RemoveSnapServices - disabling snap.charmed-mongodb.mongos.service
Apr 02 11:40:36 juju-4af4d5-2 snapd[13103]: services.go:1152: RemoveSnapServices - disabling snap.charmed-mongodb.mongod.service
I have confirmed this with another snap (charmed-etcd
) where this is also the case.
This used to work as we were testing our charm upgrades and it always restarted correctly, so I’m sending a message for help here in case anybody has an idea or if it’s a possible bug?
Some more information: Base is 22.04, but it also fails on 24.04. This is running in an LXD container. I can’t find a way to install former versions of snapd because I can’t find a way to find the revision associated with snapd 2.66.x.