Skip to content

feat(cluster): own the VM membership, peer-relation flows, and RAFT recovery (3/7) - #357

Draft
marceloneppel wants to merge 1 commit into
vm-2from
vm-3
Draft

marceloneppel wants to merge 1 commit into
vm-2from
vm-3

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

The VM charm's cluster-membership orchestration and RAFT recovery state machine still live charm-side.

Solution

  • New ClusterMembershipManager: hosts/units-ip bookkeeping, add_members, add_cluster_member, reconfigure_cluster, update_member_ip, update_endpoint_addresses, departed/raft-removal protocol, the departed-members loop, and the full RAFT recovery state machine (stuck_cluster_check/rejoin/stopped_check/cleanup, raft_reinitialisation with helpers, raft_reconnect).
  • PostgreSQLApplication.add/remove_member_ip peer-databag writers.
  • events/postgresql.py: VM observers (peer-relation-departed, raft_reconnect) + departed/checks/reconfigure handlers.
  • Composition: AbstractPostgreSQLCharm declares the observer custom events and wires the RAFT + membership managers.
  • Tests: tests/unit/test_cluster_membership.py (ported from the charm's cases; VM-only, k8s variants skip).

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

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