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

Error collecting telemetry when custom-resources flag is turned off #5744

Closed
vepatel opened this issue Jun 13, 2024 · 1 comment · Fixed by #5749
Closed

Error collecting telemetry when custom-resources flag is turned off #5744

vepatel opened this issue Jun 13, 2024 · 1 comment · Fixed by #5749
Assignees
Labels
backlog Pull requests/issues that are backlog items bug An issue reporting a potential bug
Milestone

Comments

@vepatel
Copy link
Contributor

vepatel commented Jun 13, 2024

Describe the bug

  • IC is trying to collect CR count even when custom-resources flag is turned off.

https://github.com/nginxinc/kubernetes-ingress/blob/main/internal/telemetry/collector.go#L204

Args:
      -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
      -report-ingress-status
      -external-service=nginx-ingress
      -enable-custom-resources=false
E0613 16:04:14.928064       1 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 398 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1eee0e0, 0x38797d0})
        k8s.io/[email protected]/pkg/util/runtime/runtime.go:75 +0x85
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0005cd340?})
        k8s.io/[email protected]/pkg/util/runtime/runtime.go:49 +0x6b
panic({0x1eee0e0?, 0x38797d0?})
        runtime/panic.go:770 +0x132
github.com/nginxinc/kubernetes-ingress/internal/k8s.(*LoadBalancerController).getAllPolicies(0xc0000c4008)
        github.com/nginxinc/kubernetes-ingress/internal/k8s/controller.go:3483 +0xbe
github.com/nginxinc/kubernetes-ingress/internal/telemetry.(*Collector).PolicyCount(0xc00082c4d0)
        github.com/nginxinc/kubernetes-ingress/internal/telemetry/cluster.go:170 +0x45
github.com/nginxinc/kubernetes-ingress/internal/telemetry.(*Collector).BuildReport(_, {_, _})
        github.com/nginxinc/kubernetes-ingress/internal/telemetry/collector.go:219 +0x85
github.com/nginxinc/kubernetes-ingress/internal/telemetry.(*Collector).Collect(0xc00082c4d0, {0x26eb3f0, 0xc00081e460})
        github.com/nginxinc/kubernetes-ingress/internal/telemetry/collector.go:110 +0xd0
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1()
        k8s.io/[email protected]/pkg/util/wait/backoff.go:259 +0x1f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
        k8s.io/[email protected]/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000517f08, {0x26c7de0, 0xc000264b70}, 0x1, 0xc00082a600)
        k8s.io/[email protected]/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000878f08, 0x4e94914f0000, 0x3fb999999999999a, 0x1, 0xc00082a600)
        k8s.io/[email protected]/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext({0x26eb3f0, 0xc00081e460}, 0xc000878f98, 0x4e94914f0000, 0x3fb999999999999a, 0x1)
        k8s.io/[email protected]/pkg/util/wait/backoff.go:259 +0x93
github.com/nginxinc/kubernetes-ingress/internal/telemetry.(*Collector).Start(...)
        github.com/nginxinc/kubernetes-ingress/internal/telemetry/collector.go:103
github.com/nginxinc/kubernetes-ingress/internal/k8s.(*LoadBalancerController).Run.func3({0x26eb3f0?, 0xc00081e460?})
        github.com/nginxinc/kubernetes-ingress/internal/k8s/controller.go:745 +0xd7
created by github.com/nginxinc/kubernetes-ingress/internal/k8s.(*LoadBalancerController).Run in goroutine 1
        github.com/nginxinc/kubernetes-ingress/internal/k8s/controller.go:742 +0x61e
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x1c4205e]
@vepatel vepatel added bug An issue reporting a potential bug backlog Pull requests/issues that are backlog items labels Jun 13, 2024
Copy link

Hi @vepatel thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@jjngx jjngx self-assigned this Jun 13, 2024
@jjngx jjngx linked a pull request Jun 13, 2024 that will close this issue
6 tasks
@vepatel vepatel added this to the v3.6.0 milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Pull requests/issues that are backlog items bug An issue reporting a potential bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants