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

panic when logging with uninitialized logger in config daemon #524

Closed
adrianchiris opened this issue Oct 19, 2023 · 1 comment
Closed

panic when logging with uninitialized logger in config daemon #524

adrianchiris opened this issue Oct 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@adrianchiris
Copy link
Collaborator

adrianchiris commented Oct 19, 2023

Steps to reproduce:

1.deploy sriov network operator from master (i did it via helm)
2. get logs from config daemon

[controller-runtime] log.SetLogger(...) was never called, logs will not be displayed:
goroutine 90 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go:59 +0xbd
sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).Enabled(0xc000690a00, 0x10?)
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:111 +0x3d
github.com/go-logr/logr.Logger.Enabled(...)
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/github.com/go-logr/logr/logr.go:261
github.com/go-logr/logr.Logger.Info({{0x21f50d8?, 0xc000690a00?}, 0x21cf630?}, {0x1eebbd2, 0x13}, {0xc000908ff0, 0x5, 0x5})
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/vendor/github.com/go-logr/logr/logr.go:274 +0x78
github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1.IsSupportedModel({0xc000a3a5e7, 0x4}, {0xc000ca3e48, 0x4})
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1/helper.go:124 +0x294
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils.DiscoverSriovDevices(0x0, {0x21e3c00, 0xc0002c156b})
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils/utils.go:144 +0x388
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/daemon.(*NodeStateStatusWriter).pollNicStatus(0xc0004c1cb0, 0x0)
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/daemon/writer.go:133 +0x9e
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/daemon.(*NodeStateStatusWriter).Run(0xc000900d80?, 0xc0000c8f00, 0xc0000c9080, 0x0?, 0x0?)
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/daemon/writer.go:107 +0x1f7
created by main.runStartCmd
        /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/cmd/sriov-network-config-daemon/start.go:201 +0xc4f

Issue:
in config daemon we use glog and not logger from container runtime (which is the logger that gets invoked in the error above)
hence the complaint that it is not initialized.

Possible solution:
move logging to controller runtime like we have in operator component

@adrianchiris adrianchiris added the bug Something isn't working label Oct 19, 2023
@adrianchiris
Copy link
Collaborator Author

fixed in #527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant