Remove is called after snap services are stopped
Bug #1777121 reported by
Konstantinos Tsakalozos
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Wishlist
|
Paweł Stołowski |
Bug Description
Hi,
The remove hook runs after any services provided by the snap are stopped.
There doesn't seem to be a way to perform any cleanup by interacting with the services. Let me provide an example, in the case of microk8s (that is a full kubernetes cluster) we want to release resources such as pods, this needs to be done while the kubernetes services are up.
This bug is dicussed in the forum: https:/
Thanks
Changed in snapd: | |
assignee: | nobody → Paweł Stołowski (stolowski) |
Changed in snapd: | |
status: | In Progress → Opinion |
status: | Opinion → Incomplete |
Changed in snapd: | |
importance: | High → Wishlist |
status: | Incomplete → Triaged |
To post a comment you must log in.
Thanks for providing a use case with this bug report. We might think of a pre-remove hook, but this needs discussion (simply chaning current hook to run before services are stopped is of course not an option anymore).
As for interacting with services, you can do that with `snapctl start|stop|restart ..` (see "snapctl start --help" for an example), but I'm not suggesting to start the service back just to do the cleanup, just mentioning in case it's useful in some other case. We indeed may need a pre-remove hook to cater for all possible cases.