Skip to content

Commit

Permalink
etcdctl 2.1 produce slightly different output from cluster-health com…
Browse files Browse the repository at this point in the history
…mand
  • Loading branch information
Alexander Kukushkin committed Sep 8, 2015
1 parent 04f1a26 commit dbba063
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions etcd-cluster-appliance/etcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ def members_changed(self):
return changed

def cluster_unhealthy(self):
process = subprocess.Popen([self.manager.ETCD_BINARY + 'ctl', 'cluster-health'], stdout=subprocess.PIPE)
ret = any([True for line in process.stdout if 'is unhealthy' in str(line)])
process = subprocess.Popen([self.manager.ETCD_BINARY + 'ctl', 'cluster-health'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
ret = any([True for line in process.stdout if 'is unhealthy' in str(line) or 'is unreachable' in str(line)])
process.wait()
return ret

Expand Down

0 comments on commit dbba063

Please sign in to comment.