Detect destroying a service vs removing a unit?

John Meinel john at arbash-meinel.com
Thu Dec 18 05:15:27 UTC 2014


Stub- AFAIK there isn't something today, though William might know better.

William, does your Active/Goal proposal address this? Having a Goal of 0
units would be a pretty clear indication that the service is shutting down.

John
=:->


On Wed, Dec 17, 2014 at 7:01 PM, Stuart Bishop <stuart.bishop at canonical.com>
wrote:
>
> Hi.
>
> Can anyone think of a way for a peer relationship-broken hook to
> detect that the entire service is being destroyed, rather than just a
> unit or two being removed?
>
> I have just added a peer relationship-broken hook to my Cassandra
> charm, so when a unit is removed the node is decommissioned properly
> by streaming all its data to the remaining nodes. This works fine when
> removing one unit. It works less fine when removing two or more units
> at once (I can only decommission one node at a time), but I have
> enough assistance from Cassandra to coordinate things despite the lack
> of a peer relation at this point. It fails badly when I destroy a
> service. All the units run their broken hooks, and they decommission
> themselves one at a time streaming their data to the remaining nodes,
> which will shortly be decommissioned themselves. It actually works,
> eventually, if the last node has enough disk space available but I
> expect on any real deployments the tear down will fail due to a lack
> of disk space.
>
> --
> Stuart Bishop <stuart.bishop at canonical.com>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20141218/ee42a95f/attachment.html>


More information about the Juju mailing list