Hi, The automatic hook retries[0] that landed as part of 2.0 (are documented as) run indefinitely[1] - this causes problems as an API user:
Imagine you are driving Juju using the API, and when you perform an operation (e.g. set the configuration of a service, or reboot the unit, or add a relation..) - you want to show the status of that operation. Prior to the automatic retries, you simply perform your operation, and watch the delta streams for the corresponding change to the unit - the success or otherwise of the operation is reflected in the unit agent-status/workload-status pair. Now, with retries, if you see a unit in the error state, you can't accurately reflect the status of the operation, since the unit will undoubtedly retry the hook again. Maybe it succeeds, maybe it fails again. How can one say after receiving the first delta of a unit error if the operation succeeded or failed? With no visibility up front on the retry strategy that Juju will perform (e.g. something representing the exponential backoff and a fixed number of retries before Juju admits defeat) it is impossible to say at any point in the delta stream what the result of a failed-at-least-once operation is. Can retries be limited to a small number, with a backoff algorithm explicitly documented and stuck to by Juju, with the retry attempt number included in the delta stream? Thanks, Adam [0] https://jujucharms.com/docs/2.0/reference-release-notes [1] https://jujucharms.com/docs/2.0/models-config#retrying-failed-hooks
-- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev