Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd defragmentation doesnt work as expected #12219

Closed
sridhav opened this issue Aug 14, 2020 · 3 comments
Closed

etcd defragmentation doesnt work as expected #12219

sridhav opened this issue Aug 14, 2020 · 3 comments
Labels

Comments

@sridhav
Copy link

sridhav commented Aug 14, 2020

What happened:
One of our etcd cluster (running a 5 node quorum) hit ‘mvcc: database space exceeded’ errors. This is when etcd was running with default quota backend size of 2 GB. We increased this limit to 4 GB to unblock the write operations to etcd cluster and analyze the increase in DB size. But unfortunately this size also filled up pretty fast. When we tried compaction and defragmentation, it reduced the DB size on only 2 of the 5 hosts and the remaining 3 nodes continue to show very high db size of 4 GB and the alarm of database space exceeded continue to remain on the cluster.

What you expected to happen:
defragmentation should reduce the db size and remove previously compacted versions

How to reproduce it (as minimally and precisely as possible):
This is an issue we observed only on one particular cluster

Anything else we need to know?:
Validations that we performed:

  1. All the keys when listed only had 1 revision (due to compaction).
  2. We tried compaction and defragmentation commands multiple times but the DB size goes down only on 2 hosts (as mentioned earlier in the post) and the other 3 nodes continue to show 4GB db size and the alarm persisted.

Environment:

  • Kubernetes version (use kubectl version): v1.10.8
  • etcd version: v3.4.2
  • Cloud provider or hardware configuration: Bare Metal
  • OS (e.g: cat /etc/os-release): centos 7
  • Kernel (e.g. uname -a): 3.10.0
  • Install tools:
  • Network plugin and version (if this is a network-related bug): i
  • Others:
@agargi
Copy link
Contributor

agargi commented Aug 17, 2020

@sridhav Please share commands fired to perform defragmentation. In addition, hope all etcd cluster clients are using API v3.

@sridhav
Copy link
Author

sridhav commented Aug 18, 2020

@agargi these are the commands that we have used to defragment the cluster

etcdctl compact <latest_revision>
etcdctl defrag --cluster=true
etcdctl alarm disarm

etcdctl in here is a wrapper script that we have on top of etcdctl docker instance that automatically adds the common params like endpoints, certs etc.,

@stale
Copy link

stale bot commented Nov 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 16, 2020
@stale stale bot closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants