Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Etcd restart always (#1539)
Browse files Browse the repository at this point in the history
* Added cmd to restart etcd always

* Fixed etcd restart always

restart=always for etcd instead of etcd2
  • Loading branch information
Cecile Robert-Michon authored and jackfrancis committed Oct 5, 2017
1 parent 53d6491 commit 0db5efd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parts/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ runcmd:
- sudo /bin/chown -R etcd:etcd /var/lib/etcddisk
- systemctl stop etcd
- sudo -u etcd rm -rf /var/lib/etcd/default
- sudo /bin/sed -i s/Restart=on-abnormal/Restart=always/g /lib/systemd/system/etcd.service
- systemctl daemon-reload
- systemctl restart etcd
- for i in $(seq 1 20); do curl --max-time 60 http://127.0.0.1:2379/v2/machines; [ $? -eq 0 ] && break || sleep 5; done
- retrycmd_if_failure() { for i in 1 2 3 4 5; do $@; [ $? -eq 0 ] && break || sleep 5; done ; }
Expand Down

0 comments on commit 0db5efd

Please sign in to comment.