Skip to content

Commit 0710dc2

Browse files
committed
Add information about truning off auto-retry of hooks.
1 parent fc11541 commit 0710dc2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/en/models-config.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ apt-https-proxy | string | | | Th
6868
apt-mirror | string | | | The APT mirror for the model
6969
authorized-keys | string | | | Any authorized SSH public keys for the model, as found in a ~/.ssh/authorized_keys file
7070
authorized-keys-path | string | | | Path to file containing SSH authorized keys
71+
automatically-retry-hooks | bool | true | | Set policy on retying failed hooks. See [addition info below](#retrying-failed-hooks).
7172
block-all-changes | bool | | | Whether all changes to the model will be prevented
7273
block-destroy-model | bool | | | Whether the model will be prevented from destruction
7374
block-remove-object | bool | | | Whether remove operations (machine, service, unit or relation) will be prevented
@@ -170,6 +171,27 @@ enable-os-upgrade: false
170171
You may also want to just update the package list to ensure a charm has the
171172
latest software available to it by disabling upgrades but enabling updates.
172173

174+
### Retrying failed hooks
175+
176+
Prior to version 2.0, hooks returning an error would block until the user
177+
ran a command to retry them manually:
178+
`juju resolved --retry unit-name/#`
179+
180+
From version 2.0, Juju will automatically retry hooks periodically - there is
181+
an exponential backoff, so hooks will be retried after 5, 10, 20, 40 seconds up
182+
to a period of 5 minutes, and then every 5 minutes. The logic behind this is
183+
that some hook errors are caused by timing issues or the temporary
184+
unavailability of other services - automatic retry enables the Juju model to
185+
heal itself without troubling the user.
186+
187+
However, in some circumstances, such as debugging charms, this behaviour can be
188+
distracting and unwelcome. For this reason, it is possible to set the
189+
`automatically-retry-hooks` option to 'false' to disable this behaviour. In this
190+
case, users will have to manually retry any hook which fails, using the command
191+
above, as with earlier versions of Juju.
192+
193+
!!! Note: Even with the automatic retry enabled, it is still possible to use
194+
the `juju resolved --retry unit-name/#` command to retry manually.
173195

174196
### Juju lifecycle and harvesting
175197

0 commit comments

Comments
 (0)