Juju should allow "service-destroyed" hooks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Triaged
|
Low
|
Unassigned |
Bug Description
One of the things that we (~yellow) have found whilst building charms is that in certain cases it would be great to be able to specify a service-destroyed hook, which would be responsible for cleaning up a node when a service is torn down.
This can be done at install time for charms that are regularly redeployed to the same set of nodes (e.g. for our buildbot charm, we have an "is buildbot running? stop it" step) but that's an odd place to put it, and anyway we can't rely on only one charm getting deployed to a given node.
For our buildbot charm, hooks/service-
{{{
if buildbot_running:
stop_buildbot()
remove_
remove_
}}}
tags: | added: canonical-webops |
tags: |
added: canonical-webops-juju removed: canonical-webops |
Changed in juju: | |
importance: | Wishlist → Low |
tags: | added: improvement |
the stop hook should hopefully help this, its not currently being executed, there's a spec out on how to alleviate fix this.