Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Conversation

@ottosulin
Copy link

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.

This commit adds klog.V(3).Infof instead of plain klog.Infof for frequently occuring informational events.
@ottosulin ottosulin changed the title Add log levels to prevents verbose logging Add log levels to prevent verbose logging Feb 3, 2021
@ottosulin ottosulin changed the title Add log levels to prevent verbose logging Add log levels to prevent too verbose logging Feb 3, 2021
@zetaab
Copy link
Contributor

zetaab commented Feb 4, 2021

@justinsb could you please check this

}

klog.Infof("I am leader with token %q", m.leadership.token)
klog.V(3).Infof("I am leader with token %q", m.leadership.token)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any indication that we are the leader after this change?

@justinsb
Copy link
Contributor

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
Copy link
Contributor

/approve
/lgtm

@justinsb justinsb merged commit c5382f5 into kopeio:master Feb 28, 2021
justinsb added a commit to justinsb/kops that referenced this pull request Mar 1, 2021
Changes:

* Add user agent to etcd-manager requests [kubernetes#395](kopeio/etcd-manager#395)
* Add etcd-manager metrics, add openstack API metrics [kubernetes#396](kopeio/etcd-manager#396)
* Make discovery poll interval configurable [kubernetes#397](kopeio/etcd-manager#397)
* Add log levels to prevent too verbose logging [kubernetes#394](kopeio/etcd-manager#394)
justinsb added a commit to justinsb/kops that referenced this pull request Mar 1, 2021
Changes:

* Add user agent to etcd-manager requests [kubernetes#395](kopeio/etcd-manager#395)
* Add etcd-manager metrics, add openstack API metrics [kubernetes#396](kopeio/etcd-manager#396)
* Make discovery poll interval configurable [kubernetes#397](kopeio/etcd-manager#397)
* Add log levels to prevent too verbose logging [kubernetes#394](kopeio/etcd-manager#394)
hakman pushed a commit to hakman/kops that referenced this pull request Mar 1, 2021
Changes:

* Add user agent to etcd-manager requests [kubernetes#395](kopeio/etcd-manager#395)
* Add etcd-manager metrics, add openstack API metrics [kubernetes#396](kopeio/etcd-manager#396)
* Make discovery poll interval configurable [kubernetes#397](kopeio/etcd-manager#397)
* Add log levels to prevent too verbose logging [kubernetes#394](kopeio/etcd-manager#394)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants