Skip to content

Commit 1eb10e9

Browse files
committed
handle error: storage belongs to different cluster
1 parent 770779c commit 1eb10e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/cluster.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,13 @@ def update_synchronous_node_count(self, units: int = None) -> None:
650650

651651

652652
def cluster_system_id_mismatch(self, unit_name: str) -> bool:
653-
"""Check if the Patroni service is down and
654-
if there is the error storage belongs to foreign cluster in its logs."""
653+
"""Check if the Patroni service is down.
654+
655+
If there is the error storage belongs to third-party cluster in its logs.
656+
657+
Returns:
658+
"True" if an error occurred due to the fact that the storage belongs to someone else's cluster.
659+
"""
655660
last_log_file = self._last_patroni_log_file()
656661
unit_name = unit_name.replace("/", "-")
657662
if f" CRITICAL: system ID mismatch, node {unit_name} belongs to a different cluster:" in last_log_file:

0 commit comments

Comments
 (0)