Re: Automatic hook retries in Juju 2.0
This should really be added to the docs about the automatic retry and how to shut it off. I created an issue and linked it to this discussion. https://github.com/juju/docs/issues/1235 Can someone from core or more familiar with the feature document it for the rest of us? - Matt Bruzek <matthew.bru...@canonical.com> On Thu, Jun 30, 2016 at 12:29 PM, Matt Rae <matt@canonical.com> wrote: > 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.coll...@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 < >> btele...@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.marsh...@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@lists.ubuntu.com >>> Modify settings or unsubscribe at: >>> https://lists.ubuntu.com/mailman/listinfo/juju-dev >>> >> >> -- >> Juju-dev mailing list >> Juju-dev@lists.ubuntu.com >> Modify settings or unsubscribe at: >> https://lists.ubuntu.com/mailman/listinfo/juju-dev >> >> > > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > > -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: Automatic hook retries in Juju 2.0
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.coll...@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 < > btele...@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.marsh...@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@lists.ubuntu.com >> Modify settings or unsubscribe at: >> https://lists.ubuntu.com/mailman/listinfo/juju-dev >> > > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > > -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: Automatic hook retries in Juju 2.0
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 <btele...@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.marsh...@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@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: Automatic hook retries in Juju 2.0
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.marsh...@canonical.com<mailto:casey.marsh...@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@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Automatic hook retries in Juju 2.0
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@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev