Detect destroying a service vs removing a unit?
William Reade
william.reade at canonical.com
Fri Dec 19 01:02:01 UTC 2014
Yes: goal state could, I think, address this case. I'd really
appreciate more discussion on that in the "Feature request: show
running relations in juju status" thread -- I remain reasonably
certain that neither "goal" nor "active" is quite sufficient in
isolation, but would appreciate confirmation/pushback/whatever.
This case makes me think it'd need a slight extension regardless,
though, in that we don't currently tell units when they themselves are
meant to be shutting down. (Coincidentally, seeing relation-broken in
a peer relation *does* tell you that you're shutting down, but it's
not very helpful because you find out so late.)
(that is: I think we should tell units when they are dying; and also
when their service is dying. This demands both omnipresent state -- an
env var, or something -- and a hook or two to notify of the change in
either; but I'm not sure we can usefully distinguish between
scaling-down and shutting-down without knowing both, even if one of
them is communicated via goal-state)
Cheers
William
On Thu, Dec 18, 2014 at 7:32 AM, Stuart Bishop
<stuart.bishop at canonical.com> wrote:
> On 18 December 2014 at 12:15, John Meinel <john at arbash-meinel.com> wrote:
>> 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.
>
> Ooh... and that would be useful for plenty of other things too. For
> example, I can avoid rebalancing the replication ring until the goal
> number of units exists.
>
> --
> Stuart Bishop <stuart.bishop at canonical.com>
More information about the Juju
mailing list