Skip to content

Commit

Permalink
etcd replica check should be correct now
Browse files Browse the repository at this point in the history
  • Loading branch information
sametd committed Jan 14, 2024
1 parent 6e55552 commit 1eb9a63
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, config, *args, **kwargs):
self.req_timeout = self.etcd_config["req_timeout"]
self.member_urls = self.etcd_config["member_urls"]
self.tlms = self.etcd_config["tlms"]
self.req_mem_count = self.etcd_config["req_mem_count"]
super().__init__(config, *args, **kwargs)

def process_messages(self):
Expand Down Expand Up @@ -152,7 +153,7 @@ def metric(self):

# first retrieve the member size
cluster_size = self.cluster_size(self.member_urls[0]) # any of the member should give the same info
if cluster_size != len(self.member_urls):
if cluster_size != self.req_mem_count:
status = 2
if cluster_size:
message = f"Cluster size is {cluster_size}"
Expand Down

0 comments on commit 1eb9a63

Please sign in to comment.