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

OCPBUGS-16908: Add SetLogger() prior to controller-runtime start #779

Merged

Conversation

jmencak
Copy link
Contributor

@jmencak jmencak commented Sep 1, 2023

Adding SetLogger() fixes debug stack trace dump issued by controller-runtime 0.15.0:
https://github.com/kubernetes-sigs/controller-runtime/blob/36bb89936b37aca36ba4ad34760f4879db97dba2/pkg/log/log.go#L59

Resolves: OCPBUGS-16908

Adding SetLogger() fixes debug stack trace dump issued by
controller-runtime 0.15.0:
https://github.com/kubernetes-sigs/controller-runtime/blob/36bb89936b37aca36ba4ad34760f4879db97dba2/pkg/log/log.go#L59

This was also causing very long lease acquisition times especially on
SNO clusters.

Resolves: OCPBUGS-16908
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@jmencak: This pull request references Jira Issue OCPBUGS-16908, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (liqcui@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Adding SetLogger() fixes debug stack trace dump issued by controller-runtime 0.15.0:
https://github.com/kubernetes-sigs/controller-runtime/blob/36bb89936b37aca36ba4ad34760f4879db97dba2/pkg/log/log.go#L59

This was also causing very long lease acquisition times especially on SNO clusters.

Resolves: OCPBUGS-16908

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-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 1, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmencak

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@jmencak: This pull request references Jira Issue OCPBUGS-16908, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (liqcui@redhat.com), skipping review request.

In response to this:

Adding SetLogger() fixes debug stack trace dump issued by controller-runtime 0.15.0:
https://github.com/kubernetes-sigs/controller-runtime/blob/36bb89936b37aca36ba4ad34760f4879db97dba2/pkg/log/log.go#L59

Resolves: OCPBUGS-16908

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.

@jmencak
Copy link
Contributor Author

jmencak commented Sep 1, 2023

Example of a fixed trace:

I0901 15:31:07.670265       1 leaderelection.go:255] successfully acquired lease openshift-cluster-node-tuning-operator/node-tuning-operator-lock
[controller-runtime] log.SetLogger(...) was never called, logs will not be displayed:
goroutine 109 [running]:
runtime/debug.Stack()
        /usr/lib/golang/src/runtime/debug/stack.go:24 +0x65
sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go:59 +0xbd
sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).Enabled(0xc00048f740, 0x10?)
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:111 +0x3d
github.com/go-logr/logr.Logger.Enabled(...)
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/github.com/go-logr/logr/logr.go:261
github.com/go-logr/logr.Logger.Info({{0x222c878?, 0xc00048f740?}, 0x0?}, {0xc0000573e0, 0x60}, {0xc0005db9e0, 0x6, 0x6})
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/github.com/go-logr/logr/logr.go:274 +0x78
sigs.k8s.io/controller-runtime/pkg/internal/recorder.(*Provider).getBroadcaster.func1.1(0xc0000fef00)
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/recorder/recorder.go:104 +0x1ed
k8s.io/client-go/tools/record.(*eventBroadcasterImpl).StartEventWatcher.func1()
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/k8s.io/client-go/tools/record/event.go:327 +0xa2
created by k8s.io/client-go/tools/record.(*eventBroadcasterImpl).StartEventWatcher
        /go/src/github.com/openshift/cluster-node-tuning-operator/vendor/k8s.io/client-go/tools/record/event.go:318 +0x13d

@jmencak
Copy link
Contributor Author

jmencak commented Sep 1, 2023

/retest

1 similar comment
@jmencak
Copy link
Contributor Author

jmencak commented Sep 2, 2023

/retest

@yanirq
Copy link
Contributor

yanirq commented Sep 3, 2023

/lgtm
I am not adding the critical fixes label yet, it should be considered carefully at this stage.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2023
@jmencak
Copy link
Contributor Author

jmencak commented Sep 3, 2023

I am not adding the critical fixes label yet, it should be considered carefully at this stage.

This shouldn't really break anything, it just gets rid of the annoying dump. I take full responsibility. Let's get it in.
/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Sep 3, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2023

@jmencak: 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.

@openshift-merge-robot openshift-merge-robot merged commit f277668 into openshift:master Sep 3, 2023
13 checks passed
@openshift-ci-robot
Copy link
Contributor

@jmencak: Jira Issue OCPBUGS-16908: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-16908 has been moved to the MODIFIED state.

In response to this:

Adding SetLogger() fixes debug stack trace dump issued by controller-runtime 0.15.0:
https://github.com/kubernetes-sigs/controller-runtime/blob/36bb89936b37aca36ba4ad34760f4879db97dba2/pkg/log/log.go#L59

Resolves: OCPBUGS-16908

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.

@jmencak jmencak deleted the 4.14-OCPBUGS-16908-SetLogger branch September 4, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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

4 participants