@@ -68,6 +68,7 @@ apt-https-proxy | string | | | Th
6868apt-mirror | string | | | The APT mirror for the model
6969authorized-keys | string | | | Any authorized SSH public keys for the model, as found in a ~ /.ssh/authorized_keys file
7070authorized-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 ) .
7172block-all-changes | bool | | | Whether all changes to the model will be prevented
7273block-destroy-model | bool | | | Whether the model will be prevented from destruction
7374block-remove-object | bool | | | Whether remove operations (machine, service, unit or relation) will be prevented
@@ -170,6 +171,27 @@ enable-os-upgrade: false
170171You may also want to just update the package list to ensure a charm has the
171172latest 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