Event 'pre-series-upgrade'

Event > List of events > Lifecycle events > pre-series-upgrade

Source: ops.PreSeriesUpgradeEvent

This event is triggered when an operator runs juju upgrade-series <machine> prepare ... from the command line. Read here to learn more about the series upgrade process. This event hook allows charm units on the machine being upgraded to do any necessary tasks prior to the upgrade process beginning (which may involve e.g. being rebooted, etc.).

Contents:

Emission sequence

Scenario Example command Resulting events
Upgrade series juju upgrade-series <machine> prepare pre-series-upgrade -> (events on pause until upgrade completes)

Notably, after this event fires and before the post-series-upgrade event fires, juju will pause events and changes for all units on the machine being upgraded. There will be no config-changed, update-status, etc. events to interrupt the upgrade process until after the upgrade process is completed via juju upgrade-series <machine> complete.

Observing this event in Ops

In Ops, you can register event hooks to observe the pre-series-upgrade event,

self.framework.observe(
    self.on.pre_series_upgrade, self._on_pre_series_upgrade
)

Leadership is pinned during the series upgrade process. Even if the current leader dies or is removed, re-election will not occur for applications on the upgrading machine until the series upgrade operation completes.

Last updated 1 year, 4 months ago. Help improve this document in the forum or File an issue .