Feature Request: -about-to-depart hook

Stuart Bishop stuart.bishop at canonical.com
Wed Feb 4 05:20:57 UTC 2015


On 3 February 2015 at 21:23, Stuart Bishop <stuart.bishop at canonical.com> wrote:
> On 28 January 2015 at 21:03, Mario Splivalo

>> I'm not sure if this is possible... Once the unit left relation juju is
>> no longer aware of it so there is no way of knowing if -broken completed
>> with success or not. Or am I wrong here?
>
> Hooks have no way of telling, but juju could in the same way that you
> can tell by running 'juju status'. If the unit is still running, it
> might still run the -broken hook. Once the unit is destroyed, we know
> it will never run the -broken hook.

While typing up https://bugs.launchpad.net/juju-core/+bug/1417874 I
realized that your proposed solution of a pre-departure hook is the
only one that can work. Once -departed hooks start firing both the
doomed unit and the leader have already lost the access needed to
decommission the departing node.

I'm going to need to tear out the decommissioning code from my charm
(that started failing my tests once I tightened security), and
document the manual decommissioning process. Unless someone can come
up with a better way forward with current juju.

-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju-dev mailing list