Skip to content

Commit eb65ea7

Browse files
committed
Merge pull request #2779 from carmstrong/feat-debug_etcd
feat(contrib/coreos): add etcd debug unit
2 parents c22ff9e + 08602f1 commit eb65ea7

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

contrib/coreos/user-data.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ coreos:
5656
ExecStart=/sbin/hwclock --systohc --utc
5757
RemainAfterExit=yes
5858
Type=oneshot
59+
- name: debug-etcd.service
60+
command: enable
61+
content: |
62+
[Unit]
63+
Description=etcd debugging service
64+
65+
[Service]
66+
ExecStartPre=/usr/bin/curl -sSL -o /opt/bin/jq http://stedolan.github.io/jq/download/linux64/jq
67+
ExecStartPre=/usr/bin/chmod +x /opt/bin/jq
68+
ExecStart=/usr/bin/bash -c "while true; do curl -sL http://127.0.0.1:4001/v2/stats/leader | /opt/bin/jq . ; sleep 1 ; done"
5969
write_files:
6070
- path: /etc/deis-release
6171
content: |

docs/troubleshooting_deis/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ Connect to the public IP address of one of your nodes (or use "convenience" DNS
2222
$ ssh core@deis-1.example.com -i ~/.ssh/deis.pub
2323
2424
25+
Troubleshooting etcd
26+
--------------------
27+
28+
Sometimes issues with Deis are caused by latency between CoreOS hosts. A telltale sign of this is
29+
if all of the Deis components on a single machine crash. To aid in debugging etcd, we've created
30+
a system service that is installed but not started when you deploy CoreOS using our provision scripts.
31+
32+
To start this service, run ``sudo systemctl start debug-etcd`` on a CoreOS machine in your cluster.
33+
This starts a service which queries etcd's state once per second. Watching this output with
34+
``journalctl -fu debug-etcd`` makes it easy to spot heartbeat timeouts or other abnormalities
35+
which will lead to issues running Deis successfully.
36+
2537
A deis-store component fails to start
2638
-------------------------------------
2739

0 commit comments

Comments
 (0)