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

[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed. #954

Open
lyarwood opened this issue Apr 12, 2024 · 6 comments
Labels

Comments

@lyarwood
Copy link
Member

What happened:

https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/kubevirt_ssp-operator/952/pull-ci-kubevirt-ssp-operator-main-e2e-single-node-functests/1778701297726263296

DataSources with DataImportCron template without existing PVC [test_id:7469] should create DataImportCron in golden images namespace
/go/src/github.com/kubevirt/ssp-operator/tests/dataSources_test.go:806
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
	>  goroutine 3528 [running]:
	>  runtime/debug.Stack()
	>  	/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
	>  sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go:60 +0xcd
	>  sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).Enabled(0xc000493000, 0x4e00000000000000?)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:111 +0x32
	>  github.com/go-logr/logr.Logger.Info({{0x36e8810?, 0xc000493000?}, 0xc00167d500?}, {0xc00167d500, 0x5a}, {0x0, 0x0, 0x0})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/go-logr/logr/logr.go:276 +0x72
	>  sigs.k8s.io/controller-runtime/pkg/log.(*KubeAPIWarningLogger).HandleWarningHeader(0xc00072b560?, 0x2?, {0x32eb079?, 0x7?}, {0xc00167d500?, 0x5a?})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/warning_handler.go:65 +0x167
	>  k8s.io/client-go/rest.handleWarnings(0xc0007[874](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/kubevirt_ssp-operator/952/pull-ci-kubevirt-ssp-operator-main-e2e-single-node-functests/1778701297726263296#1:build-log.txt%3A874)40?, {0x36bfb40?, 0xc00072b560?})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/warnings.go:144 +0xef
	>  k8s.io/client-go/rest.(*Request).transformResponse(0xc0025647e0, 0xc002685050, 0xc00257c400)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1179 +0x5c8
	>  k8s.io/client-go/rest.(*Request).Do.func1(0xc0012be280?, 0x0?)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1064 +0x31
	>  k8s.io/client-go/rest.(*Request).request.func3.1(...)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1039
	>  k8s.io/client-go/rest.(*Request).request.func3(0xc002685050, 0xc00276b1b8, {0x36e2978?, 0xc0012be280?}, 0x0?, 0x0?, 0xc00224bb00?, {0x0?, 0x0?}, 0x3468028)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1046 +0xd7
	>  k8s.io/client-go/rest.(*Request).request(0xc0025647e0, {0x36e25c0, 0x4bcc3a0}, 0x7?)
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1048 +0x4ed
	>  k8s.io/client-go/rest.(*Request).Do(0xc0025647e0, {0x36e25c0, 0x4bcc3a0})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/k8s.io/client-go/rest/request.go:1063 +0xb0
	>  sigs.k8s.io/controller-runtime/pkg/client.(*typedClient).Update(0xc000053200, {0x36e25c0, 0x4bcc3a0}, {0x3707208?, 0xc0005a10e0}, {0x0, 0x0, 0xc00021c400?})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/sigs.k8s.io/controller-runtime/pkg/client/typed_client.go:68 +0x37a
	>  sigs.k8s.io/controller-runtime/pkg/client.(*client).Update(0xc000053200, {0x36e25c0, 0x4bcc3a0}, {0x3707208?, 0xc0005a10e0}, {0x0, 0x0, 0x0})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go:309 +0x275
	>  kubevirt.io/ssp-operator/tests.updateSsp.func1()
	>  	/go/src/github.com/kubevirt/ssp-operator/tests/tests_common_test.go:237 +0x6c
	>  reflect.Value.call({0x2dce140?, 0xc002746610?, 0x113d165?}, {0x32e6eb1, 0x4}, {0x4bcc3a0, 0x0, 0x57?})
	>  	/usr/local/go/src/reflect/value.go:596 +0xce7
	>  reflect.Value.Call({0x2dce140?, 0xc002746610?, 0xc000076a00?}, {0x4bcc3a0?, 0x437a5d5ce3d?, 0xc001388ca0?})
	>  	/usr/local/go/src/reflect/value.go:380 +0xb9
	>  github.com/onsi/gomega/internal.(*AsyncAssertion).buildActualPoller.func3()
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/gomega/internal/async_assertion.go:325 +0x11f
	>  github.com/onsi/gomega/internal.(*AsyncAssertion).match(0xc0009fe4d0, {0x36d1ce0?, 0x4bcc3a0}, 0x1, {0x0, 0x0, 0x0})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/gomega/internal/async_assertion.go:398 +0x179
	>  github.com/onsi/gomega/internal.(*AsyncAssertion).Should(0xc0009fe4d0, {0x36d1ce0, 0x4bcc3a0}, {0x0, 0x0, 0x0})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/gomega/internal/async_assertion.go:145 +0x86
	>  kubevirt.io/ssp-operator/tests.updateSsp(0xc002746600)
	>  	/go/src/github.com/kubevirt/ssp-operator/tests/tests_common_test.go:238 +0x105
	>  kubevirt.io/ssp-operator/tests.glob..func5.7.3.1()
	>  	/go/src/github.com/kubevirt/ssp-operator/tests/dataSources_test.go:797 +0x56
	>  github.com/onsi/ginkgo/v2/internal.extractBodyFunction.func3({0x175f6c8, 0xc002701680})
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/ginkgo/v2/internal/node.go:463 +0x13
	>  github.com/onsi/ginkgo/v2/internal.(*Suite).runNode.func3()
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/ginkgo/v2/internal/suite.go:889 +0x8d
	>  created by github.com/onsi/ginkgo/v2/internal.(*Suite).runNode in goroutine 86
	>  	/go/src/github.com/kubevirt/ssp-operator/vendor/github.com/onsi/ginkgo/v2/internal/suite.go:[876](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/kubevirt_ssp-operator/952/pull-ci-kubevirt-ssp-operator-main-e2e-single-node-functests/1778701297726263296#1:build-log.txt%3A876) +0xddb
• [4.562 seconds]

What you expected to happen:
A clear and concise description of what you expected to happen.

How to reproduce it (as minimally and precisely as possible):
Steps to reproduce the behavior.

Additional context:
Add any other context about the problem here.

Environment:

  • KubeVirt version (use virtctl version): N/A
  • Kubernetes version (use kubectl version): N/A
  • VM or VMI specifications: N/A
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A
  • Install tools: N/A
  • Others: N/A
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 11, 2024
@akrejcir
Copy link
Collaborator

/remove-lifecycle stale

@kubevirt-bot kubevirt-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 15, 2024
@codingben
Copy link
Member

I think this code will resolve this issue:

import (
    "github.com/go-logr/logr"
    "sigs.k8s.io/controller-runtime/pkg/log"
)

log.SetLogger(logr.New(logr.Discard().GetSink()))

@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 13, 2024
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 12, 2024
@akrejcir
Copy link
Collaborator

/remove-lifecycle rotten

@kubevirt-bot kubevirt-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants