Skip to content

[TEST] Don't cleanup on watcher side#23

Draft
dragomirp wants to merge 1 commit into
16/edgefrom
no-cleanup
Draft

[TEST] Don't cleanup on watcher side#23
dragomirp wants to merge 1 commit into
16/edgefrom
no-cleanup

Conversation

@dragomirp
Copy link
Copy Markdown
Contributor

Issue

Solution

Checklist

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

Comment thread src/raft_controller.py
Comment on lines +284 to +307
# try:
# watcher_addr = f"{member_address}:{port}"

# # Get the status of the raft cluster.
# syncobj_util = TcpUtility(password=raft_password, timeout=3)

# for raft_host in [watcher_addr, *[f"{addr}:{RAFT_PORT}" for addr in partner_addrs]]:
# if raft_status := syncobj_util.executeCommand(raft_host, ["status"]):
# # Find all partner nodes in the Raft cluster
# # Keys look like: partner_node_status_server_10.131.50.142:2222
# for key in raft_status:
# if key.startswith(RAFT_PARTNER_PREFIX) and raft_status[key] != 2:
# member_addr = key.replace(RAFT_PARTNER_PREFIX, "")
# member_ip = member_addr.split(":")[0]

# # Check if this is a stale watcher (not a PostgreSQL node and not current watcher)
# if member_ip not in partner_addrs and member_addr != member_address:
# logger.info(f"Removing stale Raft member: {member_addr}")
# self.remove_raft_member(member_addr, raft_password, [])
# return True
# return False
# except Exception as e:
# logger.debug(f"Error during Raft cleanup: {e}")
# return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant