kopeio / etcd-manager

operator for etcd: moved to https://github.com/kubernetes-sigs/etcdadm
Apache License 2.0
164 stars 45 forks source link

Add log levels to prevent too verbose logging #394

Closed ottosulin closed 3 years ago

ottosulin commented 3 years ago

This PR would change Etcd-manager to use klog.V(3).Infof instead of plain klog.Infof for frequently occuring informational events.

We have been looking into logs generated by etcd-manager. Running an idle cluster with three master nodes, i.e. two etcd-manager clusters and six members with -v=1 results in about 300 000 log events in 24h, without significant deviations after running for few days.

After these changes, the number of log events is somewhere around 2000 events per day, which mostly include information about backup and compaction events.

zetaab commented 3 years ago

@justinsb could you please check this

justinsb commented 3 years ago

This looks good; we might want a little more logging so we know who the leader is, but I agree the current logging is probably excessive. It's a little difficult because it's hard to change without restarting the pods, but we can certainly try this direction and then add back some reasonable logging.

I re-triggered the tests, it looks like it was just a networking flake.

justinsb commented 3 years ago

/approve /lgtm