crossplane-contrib / provider-aws

Crossplane AWS Provider
Apache License 2.0
436 stars 372 forks source link

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

Closed kubevalet closed 1 month ago

kubevalet commented 3 months ago

With latest 0.48.1 release

[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
    >  goroutine 4294 [running]:
    >  runtime/debug.Stack()
    >   runtime/debug/stack.go:24 +0x5e
    >  sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/log/log.go:60 +0xcd
    >  sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithValues(0xc000952f40, {0xc00356c140, 0x2, 0x2})
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/log/deleg.go:168 +0x49
    >  github.com/go-logr/logr.Logger.WithValues(...)
    >   github.com/go-logr/logr@v1.2.4/logr.go:323
    >  sigs.k8s.io/controller-runtime/pkg/builder.(*Builder).doController.func1(0xc00356c120)
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/builder/controller.go:400 +0x173
    >  sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000938d20, {0x787f8b8, 0xc00049b4f0}, {0x64dd720?, 0xc000e2f300?})
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:306 +0x16a
    >  sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000938d20, {0x787f8b8, 0xc00049b4f0})
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266 +0x1c9
    >  sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227 +0x79
    >  created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 635
    >   sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:223 +0x565
MisterMX commented 3 months ago

I think this is only happening when the provider is run without the --debug flag.

bobh66 commented 3 months ago

Yes - this started in controller-runtime 0.15.0

https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0 https://github.com/kubernetes-sigs/controller-runtime/pull/2317