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 controlPlaneRef is nil #4818

Open
patrickdillon opened this issue Feb 26, 2024 · 5 comments
Open

Panic when controlPlaneRef is nil #4818

patrickdillon opened this issue Feb 26, 2024 · 5 comments
Labels
needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@patrickdillon
Copy link

Seeing a panic when creating a cluster with a nil Cluster.Spec.ControlPlaneRef. Fix in #4817

E0226 15:27:32.383242      89 controller.go:329] "Reconciler error" err="panic: runtime error: invalid memory address or nil pointer dereference [recovered]" controller="awsmachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AWSMachine" AWSMachine="openshift-cluster-api-guests/padillon-02261020-n4wfw-master-2" namespace="openshift-cluster-api-guests" name="padillon-02261020-n4wfw-master-2" reconcileID="7249cfa7-ab4b-4d82-a00c-a66eada86cb3"
E0226 15:27:32.383280      89 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 449 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x2e84f20?, 0x5abd740})
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:75 +0x85
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:108 +0xb2
panic({0x2e84f20?, 0x5abd740?})
	/usr/local/go/src/runtime/panic.go:914 +0x21f
sigs.k8s.io/cluster-api-provider-aws/v2/controllers.(*AWSMachineReconciler).getControlPlane(0xc000a22ab0?, {0x3bcb8d8, 0xc000b45b30}, 0xc000cefac0?, 0xc00115b040)
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controllers/awsmachine_controller.go:1234 +0x3e
sigs.k8s.io/cluster-api-provider-aws/v2/controllers.(*AWSMachineReconciler).Reconcile(0xc000a22ab0, {0x3bcb8d8, 0xc000b45b30}, {{{0xc000bcc8c0?, 0x0?}, {0xc000a2ba10?, 0xc001215d48?}}})
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controllers/awsmachine_controller.go:205 +0x74f
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x3bcfce0?, {0x3bcb8d8?, 0xc000b45b30?}, {{{0xc000bcc8c0?, 0xb?}, {0xc000a2ba10?, 0x0?}}})
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119 +0xb7
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0003e0b40, {0x3bcb910, 0xc000c05f90}, {0x3030ac0?, 0xc000cef4e0?})
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316 +0x3cc
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0003e0b40, {0x3bcb910, 0xc000c05f90})
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266 +0x1c9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227 +0x79
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 249
	/home/padillon/go/src/github.com/openshift/installer/cluster-api/providers/aws/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:223 +0x565
@k8s-ci-robot k8s-ci-robot added needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 26, 2024
@nrb
Copy link
Contributor

nrb commented Feb 26, 2024

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 26, 2024
@nrb
Copy link
Contributor

nrb commented Feb 26, 2024

/priority critcical-urgent

@k8s-ci-robot
Copy link
Contributor

@nrb: The label(s) priority/critcical-urgent cannot be applied, because the repository doesn't have them.

In response to this:

/priority critcical-urgent

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nrb
Copy link
Contributor

nrb commented Feb 26, 2024

/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-priority labels Feb 26, 2024
@k8s-triage-robot
Copy link

This issue is labeled with priority/critical-urgent but has not been updated in over 30 days, and should be re-triaged.
Critical-urgent issues must be actively worked on as someone's top priority right now.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Deprioritize it with /priority {important-soon, important-longterm, backlog}
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
4 participants