ahrtr / etcd-defrag

An easier to use and smarter etcd defragmentation tool
MIT License
90 stars 10 forks source link

[RFE] Pull quota-backend-bytes from etcd server? #40

Open evgkrsk opened 7 months ago

evgkrsk commented 7 months ago

Is it really necessary to set quota bytes as CLI arg? Can it be pulled from etcd server? Now we need to tune such CLI flag accordingly to every cluster, looks like bad work.

And thanks for really usefull tool!

ahrtr commented 7 months ago

Is it really necessary to set quota bytes as CLI arg?

Good point. I thought about it in the first place. But unfortunately, etcdserver doesn't export such an API to client for now.

evgkrsk commented 7 months ago

Ok, but maybe we can read prometheus metric for that? Maybe it will be necessary to set metrics http URL for that (as CLI arg or envvar?).

We have much less variance in metric URLs (compared to variance of quotas) and pulling quota from metrics may be handy to dynamically adjust etcd-defrag work after quota increase, for example.

Of course, such pull must be directly enabled to keep backward compability with current default quota in etcd-defrag.

ahrtr commented 7 months ago

Ok, but maybe we can read prometheus metric for that?

It's workaround instead of graceful solution to me. I suggest to keep it as it's for now until etcdserver exports an API to support this.

ahrtr commented 7 months ago

FYI. https://github.com/etcd-io/etcd/pull/17877