feat(refresh): port the VM post-refresh flows (4/6) - #271
Draft
marceloneppel wants to merge 1 commit into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_refreshflow into theRefreshManager: 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.post_refresh_side_effectscharm bridge, and the async-replication relation existence check behindhas_async_replication_relation- both owned by charm-side modules until those phases migrate.on_init.refresh_snapnow ends with the post-refresh flow call, matching the charm.