Event 'post-series-upgrade'

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

Source: ops.PostSeriesUpgradeEvent

This event is triggered when an operator runs juju upgrade-series <machine> complete 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 imediately following the upgrade process (which may have involved e.g. being rebooted, etc.).

Contents:

Emission sequence

Scenario Example command Resulting events
Upgrade series juju upgrade-series <machine> complete post-series-upgrade -> (paused events now resume)

Notably, after this event fires all paused/queued changes that accumulated since the pre-series-upgrade event fired will resume for all units on the machine that was upgraded.

Observing this event in Ops

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

self.framework.observe(
    self.on.post_series_upgrade, self._on_post_series_upgrade
)

Leadership is pinned during the series upgrade process. Even if the current leader died or was removed, re-election does not occur until the upgrade process completes.

If we could have a bit more detail here please?

  • What hooks, if any, always fire after the post-series-upgrade hook has completed, and in what order?
  • What happens if the hook fails?
  • What hooks do subordinate charms get? i.e. the OS has just been upgraded ‘underneath’ them, and so how do they find out.

Thanks!