panic while upgrading operator version
Opened this issue · 1 comments
mohamed-abdelrhman commented
if you have a deployment in the cluster while upgrading the operator version you might get this error
2024-04-29T14:25:48Z INFO Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference {"controller": "peer", "controllerGroup": "ipfs.kotal.io", "controllerKind": "Peer", "Peer": {"name":"my-peer","namespace":"default"}, "namespace": "default", "name": "my-peer", "reconcileID": "59088123-8415-4c46-ab7c-e0a730976954"}
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=0x1624313]
goroutine 608 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:116 +0x1e5
panic({0x17a0f00?, 0x29a4170?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/kotalco/kotal/controllers/ipfs.(*PeerReconciler).specStatefulSet(0x16?, 0xc00090db00, 0xc00024c500, {0x19b4970, 0xa}, {0xc000458500, 0x2, 0x2}, {0xc0001d30c0, 0x1, ...}, ...)
/workspace/controllers/ipfs/peer_controller.go:370 +0x1b33
github.com/kotalco/kotal/controllers/ipfs.(*PeerReconciler).Reconcile.func4({0x1d24430?, 0xc00024c500})
/workspace/controllers/ipfs/peer_controller.go:97 +0x27c
github.com/kotalco/kotal/controllers/shared.Reconciler.ReconcileOwned.func1()
/workspace/controllers/shared/reconciler.go:35 +0xb2
sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.mutate(0xc00024c500?, {{0xc0008fa950?, 0x0?}, {0xc0008fa946?, 0x1d10578?}}, {0x1d24430, 0xc00024c500})
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/controller/controllerutil/controllerutil.go:340 +0x49
sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.CreateOrUpdate({0x1d10578, 0xc000998a50}, {0x1d18520, 0xc0000d86c0}, {0x1d24430?, 0xc00024c500}, 0x0?)
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/controller/controllerutil/controllerutil.go:212 +0x246
github.com/kotalco/kotal/controllers/shared.Reconciler.ReconcileOwned({{0x1d18520, 0xc0000d86c0}, 0xc00012c850}, {0x1d10578, 0xc000998a50}, {0x1d22998, 0xc00090db00}, {0x1d24430?, 0xc00024c500?}, 0xc000a682d0)
/workspace/controllers/shared/reconciler.go:30 +0x1ec
github.com/kotalco/kotal/controllers/ipfs.(*PeerReconciler).Reconcile(0xc000380de0, {0x1d10578, 0xc000998a50}, {{{0xc00043f1b0?, 0x5?}, {0xc00043f1f0?, 0xc00066fd48?}}})
/workspace/controllers/ipfs/peer_controller.go:85 +0x505
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1d135a0?, {0x1d10578?, 0xc000998a50?}, {{{0xc00043f1b0?, 0xb?}, {0xc00043f1f0?, 0x0?}}})
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:119 +0xb7
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0002b5540, {0x1d105b0, 0xc0004d2e10}, {0x181e480?, 0xc0005b2780?})
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:316 +0x3cc
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0002b5540, {0x1d105b0, 0xc0004d2e10})
/go/pkg/mod/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()
/go/pkg/mod/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 156
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:223 +0x565
mohamed-abdelrhman commented