Automatic hook retries in Juju 2.0

Matt Rae matt.rae at canonical.com
Thu Jun 30 17:29:24 UTC 2016


Hi Adam, I've also found that debugging environments was difficult with
hook retrying on. I've disabled it like this:

juju set-model-config automatically-retry-hooks=false

On Thu, Jun 30, 2016 at 11:05 AM, Adam Collard <adam.collard at canonical.com>
wrote:

> Did we get a way of disabling this 'feature'? As I remember from the
> initial ML post, there was a repeated request to be able to disable this
> for certain environments (e.g. dev/test of charms).
>
> Many charms have race conditions in their hook execution which aren't seen
> through regular use of the Juju CLI client, but other Juju API drivers
> (e.g. Autopilot) expose.
>
> Although automatic hook retries may well negate transient network issues,
> they risk hiding these kinds of bugs. As a charm author I want Juju to help
> me find these bugs, so have it fail when I mess up. Papering over them
> gives me a false sense of security.
>
>
> On Thu, 30 Jun 2016 at 17:27 Bogdan Teleaga <
> bteleaga at cloudbasesolutions.com> wrote:
>
>> Hey Casey,
>>
>> They are all retried using the same policy.
>>
>> The constants that control the delay are here:
>>
>> https://github.com/juju/juju/blob/master/apiserver/retrystrategy/retrystrategy.go#L21
>>
>> Basically it's an exponential backoff with a factor of 2 that starts at 5
>> seconds and has a maximum of 5 minutes, so 5, 10, 20...up to 300 seconds.
>>
>> Iirc attempting a manual retry will reset this timer. It also never gives
>> up.
>>
>> Cheers,
>> Bogdan
>> On Jun 30, 2016, at 6:52 PM, Casey Marshall <casey.marshall at canonical.com>
>> wrote:
>>>
>>> What is the intended behavior for automatic hook retries in Juju 2.0?
>>>
>>> Specifically, I'd like to know, as a Juju user:
>>>
>>> Are errors in hooks all retried with the same policy, or are some
>>> retried with a different policy / strategy than others (install, for
>>> example)?
>>>
>>> Is there a limit to the number of times Juju will retry a hook error
>>> before "giving up"?
>>>
>>> What kind of delay can I expect between retries?
>>>
>>> Thanks,
>>> Casey
>>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20160630/876aea06/attachment-0001.html>


More information about the Juju-dev mailing list