error with logs will not be displayed
hi,
is the following a known issue? please advise how to fix it?
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
> goroutine 216 [running]:
> runtime/debug.Stack()
> /usr/local/go/src/runtime/debug/stack.go:26 +0x5e
> sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/log/log.go:60 +0xcd
> sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithValues(0xc000d27a80, {0xc001327e20, 0x2, 0x2})
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/log/deleg.go:168 +0x49
> github.com/go-logr/logr.Logger.WithValues(...)
> /root/go/pkg/mod/github.com/go-logr/[email protected]/logr.go:332
> sigs.k8s.io/controller-runtime/pkg/builder.(*TypedBuilder[...]).doController.func1()
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/builder/controller.go:449 +0x1b3
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler(0x59807a0, {0x5957e70, 0xc000e587d0}, {{{0xc0017a9bc0, 0x11}, {0xc0017a9cc8, 0x12}}})
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:293 +0x13c
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem(0x59807a0, {0x5957e70, 0xc000e587d0})
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:263 +0x20e
> sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2()
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:224 +0x85
> created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2 in goroutine 38
> /root/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:220 +0x490
Call log.SetLogger(...)
@sbueringer where to call log.SetLogger(...) - in controller-runtime?
Here is an example: https://github.com/kubernetes-sigs/controller-runtime/blob/2add01e784f9f75a8f1be38fc0a21eee5eaee84f/examples/builtins/main.go#L37
@sbueringer do you mean there is an issue in the controller-runtime code in sigs.k8s.io/controller-runtime/pkg?
No. I linked you example code how you can call log.SetLogger in your code
but the error comes from the library - do you see?
Yes it comes from controller-runtime to tell you that you have to call SetLogger.
That does not mean that there is an issue/bug in controller-runtime
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/close
See comment above
@sbueringer: Closing this issue.
In response to this:
/close
See comment above
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-sigs/prow repository.