-
Bug
-
Resolution: Done
-
Blocker
-
None
-
None
-
None
-
False
-
None
-
False
-
-
-
0
-
0
-
0
While complementing OpenID IDP support for ROSA (SDA-6692), I found an issue with the reconciliation of the configuration in the hypershift-operator,
{"level":"info","ts":"2023-01-12T12:34:19Z","msg":"Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference","controller":"hostedcontrolplane","controllerGroup":"hypershift.openshift.io","controllerKind":"HostedControlPlane","hostedControlPlane":{"name":"ad1","namespace":"ocm-adecorte-216pr0d4cghvfjjebjke6b4tapt86lnk-ad1"},"namespace":"ocm-adecorte-216pr0d4cghvfjjebjke6b4tapt86lnk-ad1","name":"ad1","reconcileID":"44ee6714-c584-4272-9169-b290c7366c94"} 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=0x2f272ef] goroutine 819 [running]: sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1() /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:118 +0x2d9 panic({0x33976c0, 0x5293990}) /usr/lib/golang/src/runtime/panic.go:890 +0x267 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth.convertProviderConfigToIDPData({0x3e25be8, 0xc00180aba0}, 0xc001ed3e90, 0x0, 0x0, 0xc000e3a3c0, {0x3e2ed50, 0xc0007e5d60}, {0xc000c81b00, 0x31}) /hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth/idp_convert.go:365 +0x218f github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth.convertIdentityProviders({0x3e25be8, 0xc00180aba0}, {0xc001d82960, 0x1, 0x4}, 0xc00180f8f0, {0x3e2ed50, 0xc0007e5d60}, {0xc000c81b00, 0x31}) /hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth/idp_convert.go:94 +0x4dd github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth.generateOAuthConfig({0x3e25be8, 0xc00180aba0}, {0x3e2ed50, 0xc0007e5d60}, {0xc000c81b00, 0x31}, 0xc0000eb290) /hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth/config.go:55 +0x149 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth.ReconcileOAuthServerConfig({0x3e25be8, 0xc00180aba0}, 0xc000f20480, {0xc0007e4820}, {0x3e2ed50, 0xc0007e5d60}, 0xc0000eb290) /hypershift/control-plane-operator/controllers/hostedcontrolplane/oauth/config.go:41 +0x14d github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.(*HostedControlPlaneReconciler).reconcileOAuthServer.func5() /hypershift/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go:2255 +0xc7 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.createOrUpdateWithOwnerRefFactory.func1.1.1() /hypershift/control-plane-operator/controllers/hostedcontrolplane/creatorupdate_ownerref_enforcer.go:20 +0x4c github.com/openshift/hypershift/support/upsert.mutate(0xc000e3a2d0, {{0xc00116c640, 0x31}, {0x3828af5, 0xf}}, {0x3e3b9e0, 0xc000f20480}) /hypershift/support/upsert/upsert.go:137 +0x71 github.com/openshift/hypershift/support/upsert.(*createOrUpdateProvider).CreateOrUpdate(0xc000b7a568, {0x3e25be8, 0xc00180aba0}, {0x3e2e7a0, 0xc0008db180}, {0x3e3b9e0, 0xc000f20480}, 0xc000e3a2d0) /hypershift/support/upsert/upsert.go:88 +0x554 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.createOrUpdateWithOwnerRefFactory.func1.1({0x3e25be8, 0xc00180aba0}, {0x3e2e7a0, 0xc0008db180}, {0x3e3b9e0, 0xc000f20480}, 0xc0000b8880) /hypershift/control-plane-operator/controllers/hostedcontrolplane/creatorupdate_ownerref_enforcer.go:31 +0x190 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.(*HostedControlPlaneReconciler).reconcileOAuthServer(0xc0008db180, {0x3e25be8, 0xc00180aba0}, 0xc001d80000, 0xc0011b0260, {0xc0013f5030, 0x61}, 0x1bb, 0xc000b45f38) /hypershift/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go:2254 +0xe0c github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.(*HostedControlPlaneReconciler).reconcile(0xc0008db180, {0x3e25be8, 0xc00180aba0}, 0xc001d80000, 0xc000b45f38, 0xc0011b0260, {{0xc001a7d1d0, 0x4d}, 0x192b, {0xc0013f5030, ...}, ...}) /hypershift/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go:778 +0x2134 github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.(*HostedControlPlaneReconciler).update(0xc0008db180, {0x3e25be8, 0xc00180aba0}, 0xc001d80000) /hypershift/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go:639 +0x153e github.com/openshift/hypershift/control-plane-operator/controllers/hostedcontrolplane.(*HostedControlPlaneReconciler).Reconcile(0xc0008db180, {0x3e25be8, 0xc00180aba0}, {{{0xc000a69880, 0x31}, {0xc0015ed5ac, 0x3}}}) /hypershift/control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go:553 +0x4325 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0xc0008db2c0, {0x3e25be8, 0xc00180aba0}, {{{0xc000a69880, 0x31}, {0xc0015ed5ac, 0x3}}}) /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:121 +0x172 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0008db2c0, {0x3e25be8, 0xc00180aba0}, {0x34b9460, 0xc0003aece0}) /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:320 +0x3d9 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0008db2c0, {0x3e25b40, 0xc000f58400}) /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:273 +0x3a5 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2() /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:234 +0xdc created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 /hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:230 +0x4d9
This causes CPO to be in CrashLoopBackOff