Skip to content

feat(refresh): port the K8s refresh reconcile flow (5/6) - #272

Draft
marceloneppel wants to merge 1 commit into
dpe-refresh-3-refresh-testsfrom
dpe-refresh-5-k8s-flows
Draft

feat(refresh): port the K8s refresh reconcile flow (5/6)#272
marceloneppel wants to merge 1 commit into
dpe-refresh-3-refresh-testsfrom
dpe-refresh-5-k8s-flows

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Sep 4, 2026

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 VM post-refresh flows PR.

Solution

Ports the K8s charm's reconcile(): ensure the pgdata dirs and symlinks and reconcile the Pebble layers through new charm bridges (the storage helper and layer generation stay behind those bridges until their own migration phases), wait for the member to rejoin with healthy replication, then allow the next unit to refresh - along with the charm-init resume block (on_init) for the Kubernetes substrate.

The pebble-ready handler gains the refresh safeguard ported from the charm: defer while a refresh is in progress and the workload is not allowed to start, with the refresh manager injected into the events handler. Note: the K8s charm referenced is_replication_healthy without calling it in the reconcile wait (an always-truthy bound method, so the wait only actually checked cluster membership); the library port calls the method, making the replication-health check effective. This makes the refresh resume gate stricter than 16/edge K8s: units with unhealthy replication now wait instead of proceeding.

Ports the K8s charm's reconcile() - ensure the pgdata dirs and symlinks and
reconcile the Pebble layers through new charm bridges (the storage helper and
the layer generation stay behind those bridges until their own migration
phases), wait for the member to rejoin with healthy replication, then allow
the next unit to refresh - along with the charm-init resume block (on_init)
for the Kubernetes substrate.

The pebble-ready handler also gains the refresh safeguard ported from the
charm: defer while a refresh is in progress and the workload is not allowed
to start, with the refresh manager injected into the events handler.
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