Skip to content

feat(refresh): port the VM post-refresh flows (4/6) - #271

Draft
marceloneppel wants to merge 1 commit into
dpe-refresh-3-refresh-testsfrom
dpe-refresh-4-vm-flows
Draft

feat(refresh): port the VM post-refresh flows (4/6)#271
marceloneppel wants to merge 1 commit into
dpe-refresh-3-refresh-testsfrom
dpe-refresh-4-vm-flows

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

Part of the refresh module migration from the PostgreSQL VM and K8s charms' 16/edge branches into this library. Stacks on #265 and runs in parallel with the K8s reconcile flow PR.

Solution

Ports the VM charm's _post_snap_refresh flow into the RefreshManager: the internal cert CN check against the unit IP (regenerate + push via the TLS manager), Patroni restart, the post-refresh side effects, the member-join and replication-health wait, the leader-only temp tablespace catalog migration, and the refresh completion.

  • The temp tablespace migration (one-shot DROP/CREATE TABLESPACE outside a transaction block, CHECKPOINT to flush WAL, blocking-object reporting on failure) is ported verbatim; the TEMP paths come from the VM workload's paths instead of the charm constants.
  • The exporter/pgBackRest/watcher side effects move behind a new post_refresh_side_effects charm bridge, and the async-replication relation existence check behind has_async_replication_relation - both owned by charm-side modules until those phases migrate.
  • The charm-init resume block (post-snap-refresh resume vs temp tablespace prep + allow next unit) is wired through the manager's on_init.
  • refresh_snap now ends with the post-refresh flow call, matching the charm.

Ports the VM charm's post-snap-refresh flow into the RefreshManager: the
internal cert CN check against the unit IP (regenerating and pushing via the
TLS manager), Patroni restart, the substrate post-refresh side effects
(exporters, pgBackRest service, watcher address - behind a new charm bridge
since those modules have not migrated), the member-join and replication
health wait, the leader-only temp tablespace catalog migration with its
Patroni settle window, and the refresh completion.

The temp tablespace migration (DROP/CREATE TABLESPACE outside a transaction,
CHECKPOINT to flush WAL, blocking-object reporting) is ported verbatim; the
TEMP paths come from the workload's VM paths instead of charm constants, and
the async-replication relation check is behind a new charm bridge. The charm
init resume block is wired through the manager's on_init.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant