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: nodeutils.go:182 AreKubeletConfigsRendered #61

Open
montaguethomas opened this issue Jul 6, 2022 · 0 comments
Open

Panic: nodeutils.go:182 AreKubeletConfigsRendered #61

montaguethomas opened this issue Jul 6, 2022 · 0 comments

Comments

@montaguethomas
Copy link

montaguethomas commented Jul 6, 2022

While debugging #60, I deleted the generated kubelet MachineConfig object. This caused a panic in Compliance Operator.

for _, r := range diff.Rows {
diffData = append(diffData, []string{fmt.Sprintf("Path: %s", r.Key), fmt.Sprintf("Expected: %s", r.Expected), fmt.Sprintf("Got: %s", r.Got)})
}

{"level":"info","ts":1657049016.1875877,"logger":"suitectrl","msg":"Generating events for suite","Request.Namespace":"openshift-compliance","Request.Name":"rhcos4"}
{"level":"info","ts":1657049016.2087462,"logger":"suitectrl","msg":"All scans are in Done phase. Post-processing remediations","Request.Namespace":"openshift-compliance","Request.Name":"rhcos4"}
E0705 19:23:36.208997       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 4677 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x18785e0, 0x2c56620})
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:74 +0x99
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc003489600})
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:48 +0x75
panic({0x18785e0, 0x2c56620})
	/usr/lib/golang/src/runtime/panic.go:1038 +0x215
github.com/openshift/compliance-operator/pkg/utils.AreKubeletConfigsRendered(0xc000cd2000, {0x1d88400, 0xc00013dec0})
	/remote-source/app/pkg/utils/nodeutils.go:182 +0x638
github.com/openshift/compliance-operator/pkg/controller/compliancesuite.(*ReconcileComplianceSuite).reconcileRemediations(0xc0003faea0, 0xc000ac6700, {0x1d75f90, 0xc0011a4da0})
	/remote-source/app/pkg/controller/compliancesuite/compliancesuite_controller.go:521 +0x6b1
github.com/openshift/compliance-operator/pkg/controller/compliancesuite.(*ReconcileComplianceSuite).Reconcile(0xc0003faea0, {{{0xc000696420, 0x4151cf}, {0xc000a688c4, 0x112b9bb}}})
	/remote-source/app/pkg/controller/compliancesuite/compliancesuite_controller.go:180 +0x698
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0008e3440, {0x18e6140, 0xc003489600})
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235 +0x2b3
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0008e3440)
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:209 +0xc5
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(...)
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000689f00)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x67
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x2000006c0, {0x1d25460, 0xc0006fae10}, 0x1, 0xc000060b40)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xb6
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc002f995c0, 0x3b9aca00, 0x0, 0x0, 0x445885)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x89
k8s.io/apimachinery/pkg/util/wait.Until(0x0, 0xc000b01f68, 0xc000b01f78)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90 +0x25
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:170 +0x3e9
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=0x0 pc=0x132ead8]

goroutine 4677 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc003489600})
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:55 +0xd8
panic({0x18785e0, 0x2c56620})
	/usr/lib/golang/src/runtime/panic.go:1038 +0x215
github.com/openshift/compliance-operator/pkg/utils.AreKubeletConfigsRendered(0xc000cd2000, {0x1d88400, 0xc00013dec0})
	/remote-source/app/pkg/utils/nodeutils.go:182 +0x638
github.com/openshift/compliance-operator/pkg/controller/compliancesuite.(*ReconcileComplianceSuite).reconcileRemediations(0xc0003faea0, 0xc000ac6700, {0x1d75f90, 0xc0011a4da0})
	/remote-source/app/pkg/controller/compliancesuite/compliancesuite_controller.go:521 +0x6b1
github.com/openshift/compliance-operator/pkg/controller/compliancesuite.(*ReconcileComplianceSuite).Reconcile(0xc0003faea0, {{{0xc000696420, 0x4151cf}, {0xc000a688c4, 0x112b9bb}}})
	/remote-source/app/pkg/controller/compliancesuite/compliancesuite_controller.go:180 +0x698
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0008e3440, {0x18e6140, 0xc003489600})
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235 +0x2b3
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0008e3440)
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:209 +0xc5
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(...)
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000689f00)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x67
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x2000006c0, {0x1d25460, 0xc0006fae10}, 0x1, 0xc000060b40)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xb6
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc002f995c0, 0x3b9aca00, 0x0, 0x0, 0x445885)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x89
k8s.io/apimachinery/pkg/util/wait.Until(0x0, 0xc000b01f68, 0xc000b01f78)
	/remote-source/deps/gomod/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90 +0x25
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:170 +0x3e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant