Skip to content

etcd

Commands

etcdctl --endpoints=192.168.5.1:2380,192.168.5.2:2380,192.168.5.3:2380 --write-out=table endpoint status

Information

Variable docs: https://etcd.io/docs/v3.4.0/op-guide/configuration/

Space quota info: https://etcd.io/docs/v3.2.17/op-guide/maintenance/

Errors

No space

2020-12-09 23:13:30.509732 W | etcdserver: failed to apply request "header: lease_grant:" with response "" took (2.78µs) to execute, err is etcdserver: no space

Steps to fix:

1. Find leader of cluster. Use command

ETCDCTL_API=3 etcdctl --write-out=table endpoint status

2. Execute commands

rev=$(ETCDCTL_API=3 etcdctl --endpoints=:2379 endpoint status --write-out="json" | egrep -o '"revision":[0-9]*' | egrep -o '[0-9]*')
ETCDCTL_API=3 etcdctl compact $rev
ETCDCTL_API=3 etcdctl defrag
ETCDCTL_API=3 etcdctl alarm disarm

from here