Quentin-M / etcd-cloud-operator

Deploying and managing production-grade etcd clusters on cloud providers: failure recovery, disaster recovery, backups and resizing.
Apache License 2.0
233 stars 42 forks source link

e/terraform/m/i/r/eco-health.sh: fix condition for newer versions of etcdctl #44

Closed Quentin-M closed 4 years ago

Quentin-M commented 4 years ago

old behavior:

core ~ $ /opt/bin/e --endpoints=${IP}:2379 endpoint --dial-timeout=500ms --command-timeout=500ms health
<redacted>:2379 is healthy: successfully committed proposal: took = 1.079552ms

core ~ $ /opt/bin/e --endpoints=${IP}:2379 endpoint --dial-timeout=500ms --command-timeout=500ms health | grep "successfully" 2>&1 > /dev/null
core ~ $ echo $?
0

new behavior:

core ~ $ /opt/bin/e --endpoints=${IP}:2379 endpoint --dial-timeout=500ms --command-timeout=500ms health | grep "successfully" 2>&1 > /dev/null
<redacted>:2379 is healthy: successfully committed proposal: took = 8.815389ms
core ~ $ echo $?
1