Skip to content

Instantly share code, notes, and snippets.

View yichengq's full-sized avatar

Yicheng Qin yichengq

View GitHub Profile
@yichengq
yichengq / gist:5097b4c2f5c341a0f76e
Created April 16, 2015 18:10
follower fails to catch up the leader in 40s when reboot
2015/04/16 12:18:20 etcd: listening for peers on http://10.240.172.103:2380
2015/04/16 12:18:20 etcd: listening for client requests on http://10.240.172.103:2379
2015/04/16 12:18:20 etcdserver: datadir is valid for the 2.0.1 format
2015/04/16 12:18:20 snap: unexpected non-snap file 0000000000000017-0000000000041fd9.snap.broken
2015/04/16 12:18:20 snap: unexpected non-snap file 0000000000000088-0000000000226ecc.snap.broken
2015/04/16 12:18:20 snap: unexpected non-snap file 0000000000000056-000000000016ec80.snap.broken
2015/04/16 12:18:20 snap: unexpected non-snap file 0000000000000061-0000000000197561.snap.broken
2015/04/16 12:18:20 snap: unexpected non-snap file 000000000000003f-00000000000e7b00.snap.broken
2015/04/16 12:18:20 snap: unexpected non-snap file 0000000000000052-00000000001491b3.snap.broken
2015/04/16 12:18:23 etcdserver: recovered store from snapshot at index 2531248
This file has been truncated, but you can view the full file.
=== RUN TestMultipleTLSNodes
[etcd] Jul 31 14:52:24.616 WARNING | Using the directory 1.local.etcd as the etcd curation directory because a directory was not specified.
2014/07/31 14:52:24 id=43627f22de7eaa1d server.new raftPubAddr=http://127.0.0.1:7001
2014/07/31 14:52:24 id=0 server.setId oldId=43627f22de7eaa1d
2014/07/31 14:52:24 id=0 server.setTick tick="5ms"
2014/07/31 14:52:24 id=0 server.run source=-peers seeds="[]"
2014/07/31 14:52:24 id=0 server.run mode=participantMode
2014/07/31 14:52:24 id=0 participant.run action=bootstrap
2014/07/31 14:52:24 raft.step beforeState state=stateFollower term=0 vote=-1 lead=-1
2014/07/31 14:52:24 raft.step beforeLog offset=0 committed=0 applied=0 len(ents)=1
@yichengq
yichengq / gist:5b164014595ca4d84ec4
Last active August 29, 2015 14:04
etcd log fmt

Log Format

dateTime name[id]: source level: message

Field name Description
dateTime The date and time at which the event was logged.
name The name of the etcd machine that generated the event.
id The auto generated id of the etcd machine that is used in the cluster.
source The source of the event indicated by package, class or function.
send from 1 to 2 in msgVote with index 5 with log term 1 with len entries 0 with commit 0
send from 2 to 1 in msgVoteResp with index 5 with log term 0 with len entries 0 with commit 0
send from 1 to 2 in msgApp with index 5 with log term 1 with len entries 1 with commit 5
send from 2 to 1 in msgAppResp with index 6 with log term 0 with len entries 0 with commit 0
send from 1 to 2 in msgApp with index 6 with log term 39 with len entries 0 with commit 6
send from 1 to 2 in msgApp with index 6 with log term 39 with len entries 1 with commit 6
send from 2 to 1 in msgAppResp with index 7 with log term 0 with len entries 0 with commit 0
0 : 0 5
1 : 1 6
2 : 1 6
yichengq@1 ~/D/etcd2> curl http://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar
{"action":"set","node":{"key":"/foo","value":"bar","modifiedIndex":45,"createdIndex":45},"prevNode":{"key":"/foo","value":"bbbar","modifiedIndex":8,"createdIndex":8}}%
yichengq@1 ~/D/etcd2> curl http://127.0.0.1:4001/v2/keys/foo\?prevValue\=bar -XPUT -d value=bar2
{"action":"compareAndSwap","node":{"key":"/foo","value":"bar2","modifiedIndex":46,"createdIndex":45},"prevNode":{"key":"/foo","value":"bar","modifiedIndex":45,"createdIndex":45}}%
yichengq@1 ~/D/etcd2> curl http://127.0.0.1:4001/v2/keys/foo\?prevValue\=bar -XPUT -d value=bar2
{"errorCode":101,"message":"Compare failed","cause":"[bar != bar2]","index":46}
@yichengq
yichengq / gist:9632734
Created March 19, 2014 00:00
./build_image --noenable_rootfs_verification dev
coreos-init-0.0.1-r66: * Press Ctrl-C to Stop
coreos-init-0.0.1-r66: *
coreos-init-0.0.1-r66: * coreos-base/coreos-cloudinit-0.1.2-r3:0::coreos
coreos-init-0.0.1-r66: * /mnt/host/source/src/build/images/amd64-generic/260.0.0+2014-03-18-2313-a1/rootfs/usr/lib/systemd/system/coreos-cloudinit-oem.service
coreos-init-0.0.1-r66: *
coreos-init-0.0.1-r66: * Package 'coreos-base/coreos-init-0.0.1-r66' NOT merged due to file
coreos-init-0.0.1-r66: * collisions. If necessary, refer to your elog messages for the whole
coreos-init-0.0.1-r66: * content of the above message.
coreos-init-0.0.1-r66: >>> Failed to install coreos-base/coreos-init-0.0.1-r66 to /mnt/host/source/src/build/images/amd64-generic/260.0.0+2014-03-18-2313-a1/rootfs/, Log file:
coreos-init-0.0.1-r66: >>> '/build/amd64-generic/tmp/portage/logs/coreos-base:coreos-init-0.0.1-r66:20140318-231940.log'