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

Bug 2038275: *: Use --v=2 logging to drop client-side throttling noise #723

Merged
merged 1 commit into from Jan 10, 2022

Conversation

jottofar
Copy link
Contributor

@jottofar jottofar commented Jan 7, 2022

We've been using --v=5 since 88c222c
(install/0000_00_cluster-version-operator_03_deployment: Bump to
--v=5, 2020-08-30, #448). But it leads to large quantities of noise
from client-side throttling 1, and that throttling is V(3):

$ grep -n . vendor/k8s.io/client-go/rest/request.go | grep -B7 -A6 '^597:'
589: switch {
590: case len(retryInfo) > 0:
591: message = fmt.Sprintf("Waited for %v, %s - request: %s:%s", latency, retryInfo, r.verb, r.URL().String())
592: default:
593: message = fmt.Sprintf("Waited for %v due to client-side throttling, not priority and fairness, request: %s:%s", latency, r.verb, r.URL().String())
594: }
596: if latency > longThrottleLatency {
597: klog.V(3).Info(message)
598: }
599: if latency > extraLongThrottleLatency {
600: // If the rate limiter latency is very high, the log message should be printed at a higher log level,
601: // but we use a throttled logger to prevent spamming.
602: globalThrottledLogger.Infof("%s", message)
603: }

Auditing:

$ git --no-pager grep 'klog.V([3-5])' vendor

I don't see much that I'd miss. I liked having
vendor/github.com/openshift/library-go/pkg/verify's logging back when
we made that pivot, but now that that code is old and stable, I'm ok
losing it.

I've shifted the lib/ stuff down to V(2) using:

$ sed -i 's/klog[.]V([3-5])/klog.V(2)/g' $(git grep -l klog.V lib)

It's mostly hotloop-detection since 40d0a4e (Log object updates and
show existing/required diff, 2021-06-03, #561, 2), and isn't all
that noisy since 05e1af7 (Bug 1984414: Log resource diffs on update
only in reconcile mode, 2021-07-22, #628, 3).

I've shifted the pkg/ stuff down to V(2) using:

$ sed -i 's/klog[.]V([3-5])/klog.V(2)/g' $(git grep -l klog.V pkg)

It's mostly fairly core stuff, and low-noise except for the
per-manifest "Running sync for ..." and "Done syncing for ..."
messages 1. The per-manifest messages can be useful to identify
where the CVO is in the sync cycle, so I'm keeping them for now. We
may be able to punt them up to higher levels if we get an alternative
mechanism for identifying sync cycle positions (e.g. events for
task-node completion or task failure).

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@jottofar: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

*: Use --v=2 logging to drop client-side throttling noise

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jottofar
Copy link
Contributor Author

jottofar commented Jan 7, 2022

/hold
need to get rid of clusterconditions

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2022
@openshift-ci openshift-ci bot requested review from vrutkovs and wking January 7, 2022 19:51
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2022
We've been using --v=5 since 88c222c
(install/0000_00_cluster-version-operator_03_deployment: Bump to
--v=5, 2020-08-30, openshift#448).  But it leads to large quantities of noise
from client-side throttling [1], and that throttling is V(3):

  $ grep -n . vendor/k8s.io/client-go/rest/request.go | grep -B7 -A6 '^597:'
  589:    switch {
  590:    case len(retryInfo) > 0:
  591:            message = fmt.Sprintf("Waited for %v, %s - request: %s:%s", latency, retryInfo, r.verb, r.URL().String())
  592:    default:
  593:            message = fmt.Sprintf("Waited for %v due to client-side throttling, not priority and fairness, request: %s:%s", latency, r.verb, r.URL().String())
  594:    }
  596:    if latency > longThrottleLatency {
  597:            klog.V(3).Info(message)
  598:    }
  599:    if latency > extraLongThrottleLatency {
  600:            // If the rate limiter latency is very high, the log message should be printed at a higher log level,
  601:            // but we use a throttled logger to prevent spamming.
  602:            globalThrottledLogger.Infof("%s", message)
  603:    }

Auditing:

  $ git --no-pager grep 'klog.V([3-5])' vendor

I don't see much that I'd miss.  I liked having
vendor/github.com/openshift/library-go/pkg/verify's logging back when
we made that pivot, but now that that code is old and stable, I'm ok
losing it.

I've shifted the lib/ stuff down to V(2) using:

  $ sed -i 's/klog[.]V([3-5])/klog.V(2)/g' $(git grep -l klog.V lib)

It's mostly hotloop-detection since 40d0a4e (Log object updates and
show existing/required diff, 2021-06-03, openshift#561, [2]), and isn't all
that noisy since 05e1af7 (Bug 1984414: Log resource diffs on update
only in reconcile mode, 2021-07-22, openshift#628, [3]).

I've shifted the pkg/ stuff down to V(2) using:

  $ sed -i 's/klog[.]V([3-5])/klog.V(2)/g' $(git grep -l klog.V pkg)

It's mostly fairly core stuff, and low-noise except for the
per-manifest "Running sync for ..." and "Done syncing for ..."
messages [1].  The per-manifest messages can be useful to identify
where the CVO is in the sync cycle, so I'm keeping them for now.  We
may be able to punt them up to higher levels if we get an alternative
mechanism for identifying sync cycle positions (e.g. events for
task-node completion or task failure).

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2034493#c1
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1879184
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1984414
@jottofar
Copy link
Contributor Author

jottofar commented Jan 7, 2022

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2022
Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2022
@wking wking changed the title *: Use --v=2 logging to drop client-side throttling noise Bug 2038275: *: Use --v=2 logging to drop client-side throttling noise Jan 7, 2022
@openshift-ci openshift-ci bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jan 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@jottofar: This pull request references Bugzilla bug 2038275, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.z) matches configured target release for branch (4.9.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 2034493 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 2034493 targets the "4.10.0" release, which is one of the valid target releases: 4.10.0
  • bug has dependents

Requesting review from QA contact:
/cc @jianlinliu

In response to this:

Bug 2038275: *: Use --v=2 logging to drop client-side throttling noise

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested a review from jianlinliu January 7, 2022 20:26
@LalatenduMohanty
Copy link
Member

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jan 7, 2022
Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, LalatenduMohanty, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [LalatenduMohanty,jottofar,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@wking
Copy link
Member

wking commented Jan 7, 2022

sandboxes are orthogonal:

/override ci/prow/e2e-agnostic-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2022

@wking: Overrode contexts on behalf of wking: ci/prow/e2e-agnostic-upgrade

In response to this:

sandboxes are orthogonal:

/override ci/prow/e2e-agnostic-upgrade

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 8, 2022

@jottofar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jianlinliu
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jan 10, 2022
@openshift-merge-robot openshift-merge-robot merged commit f2551e5 into openshift:release-4.9 Jan 10, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 10, 2022

@jottofar: All pull requests linked via external trackers have merged:

Bugzilla bug 2038275 has been moved to the MODIFIED state.

In response to this:

Bug 2038275: *: Use --v=2 logging to drop client-side throttling noise

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sdodson
Copy link
Member

sdodson commented Jan 10, 2022

/cherry-pick release-4.8

@openshift-cherrypick-robot

@sdodson: #723 failed to apply on top of branch "release-4.8":

Applying: *: Use --v=2 logging to drop client-side throttling noise
Using index info to reconstruct a base tree...
M	install/0000_00_cluster-version-operator_03_deployment.yaml
M	lib/resourceapply/apiext.go
M	lib/resourceapply/apps.go
M	lib/resourceapply/batch.go
M	lib/resourceapply/core.go
M	lib/resourceapply/cv.go
M	lib/resourceapply/imagestream.go
M	lib/resourceapply/rbac.go
M	lib/resourceapply/security.go
M	lib/resourcebuilder/batch.go
A	lib/resourcedelete/helper.go
M	pkg/autoupdate/autoupdate.go
M	pkg/cvo/cvo.go
M	pkg/cvo/cvo_test.go
M	pkg/cvo/internal/generic.go
M	pkg/cvo/metrics.go
M	pkg/cvo/sync_worker.go
M	pkg/cvo/updatepayload.go
M	pkg/cvo/upgradeable.go
M	pkg/payload/task_graph.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/payload/task_graph.go
Auto-merging pkg/cvo/upgradeable.go
CONFLICT (content): Merge conflict in pkg/cvo/upgradeable.go
Auto-merging pkg/cvo/updatepayload.go
Auto-merging pkg/cvo/sync_worker.go
Auto-merging pkg/cvo/metrics.go
Auto-merging pkg/cvo/internal/generic.go
CONFLICT (content): Merge conflict in pkg/cvo/internal/generic.go
Auto-merging pkg/cvo/cvo_test.go
Auto-merging pkg/cvo/cvo.go
Auto-merging pkg/autoupdate/autoupdate.go
CONFLICT (modify/delete): lib/resourcedelete/helper.go deleted in HEAD and modified in *: Use --v=2 logging to drop client-side throttling noise. Version *: Use --v=2 logging to drop client-side throttling noise of lib/resourcedelete/helper.go left in tree.
Auto-merging lib/resourcebuilder/batch.go
CONFLICT (content): Merge conflict in lib/resourcebuilder/batch.go
Auto-merging lib/resourceapply/security.go
CONFLICT (content): Merge conflict in lib/resourceapply/security.go
Auto-merging lib/resourceapply/rbac.go
CONFLICT (content): Merge conflict in lib/resourceapply/rbac.go
Auto-merging lib/resourceapply/imagestream.go
CONFLICT (content): Merge conflict in lib/resourceapply/imagestream.go
Auto-merging lib/resourceapply/cv.go
CONFLICT (content): Merge conflict in lib/resourceapply/cv.go
Auto-merging lib/resourceapply/core.go
CONFLICT (content): Merge conflict in lib/resourceapply/core.go
Auto-merging lib/resourceapply/batch.go
CONFLICT (content): Merge conflict in lib/resourceapply/batch.go
Auto-merging lib/resourceapply/apps.go
CONFLICT (content): Merge conflict in lib/resourceapply/apps.go
Auto-merging lib/resourceapply/apiext.go
CONFLICT (content): Merge conflict in lib/resourceapply/apiext.go
Auto-merging install/0000_00_cluster-version-operator_03_deployment.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 *: Use --v=2 logging to drop client-side throttling noise
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.8

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants