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

Handling of unbound ServerClaims #14

Closed
defo89 opened this issue Jul 31, 2024 · 0 comments · Fixed by #15
Closed

Handling of unbound ServerClaims #14

defo89 opened this issue Jul 31, 2024 · 0 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@defo89
Copy link
Contributor

defo89 commented Jul 31, 2024

Describe the bug
We can patch the MetalMachine .spec.ProviderId after ServerClaim is bound to a Server. If claim is Unbound, we might want to wait or requeue until it's bound.

2024-07-31T13:04:30Z	INFO	Created or Patched ServerClaim	{"ServerClaim": "metalmachinetemplate-sample-control-plane-s4c9p", "Operation": "unchanged"}
2024-07-31T13:04:30Z	INFO	Patching ProviderID in MetalMachine
2024-07-31T13:04:30Z	INFO	Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference	{"controller": "metalmachine", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "MetalMachine", "MetalMachine": {"name":"metalmachinetemplate-sample-control-plane-s4c9p","namespace":"default"}, "namespace": "default", "name": "metalmachinetemplate-sample-control-plane-s4c9p", "reconcileID": "fc8037e4-78ae-47ff-8c38-498abdc48bb5"}
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=0x1a0c98a]

goroutine 91 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:111 +0x1e5
panic({0x1be5a00?, 0x326a360?})
	/Users/user/sdk/go1.22.5/src/runtime/panic.go:770 +0x132
github.com/ironcore-dev/cluster-api-provider-metal/internal/controller.(*MetalMachineReconciler).patchMetalMachineProviderID(0xc0000110f8, {0x21c9d40, 0xc00017c600}, 0xc0009290c8, 0xc0005b43c0, 0xc000931b80)
	/Users/user/go/src/github.com/ironcore-dev/cluster-api-provider-metal/internal/controller/metalmachine_controller.go:333 +0x6a
github.com/ironcore-dev/cluster-api-provider-metal/internal/controller.(*MetalMachineReconciler).reconcileNormal(0xc0000110f8, {0x21c9d40, 0xc00017c600}, 0xc0005f5220, 0xc000564288?)
	/Users/user/go/src/github.com/ironcore-dev/cluster-api-provider-metal/internal/controller/metalmachine_controller.go:237 +0x436
github.com/ironcore-dev/cluster-api-provider-metal/internal/controller.(*MetalMachineReconciler).Reconcile(0xc0000110f8, {0x21c9d40, 0xc00017c600}, {{{0xc000910d26?, 0x5?}, {0xc0009342a0?, 0xc00090dd10?}}})
	/Users/user/go/src/github.com/ironcore-dev/cluster-api-provider-metal/internal/controller/metalmachine_controller.go:157 +0xc25
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x21cfed8?, {0x21c9d40?, 0xc00017c600?}, {{{0xc000910d26?, 0xb?}, {0xc0009342a0?, 0x0?}}})
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:114 +0xb7
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0001ddd90, {0x21c9d78, 0xc00001c780}, {0x1c937c0, 0xc00031e060})
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311 +0x3bc
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0001ddd90, {0x21c9d78, 0xc00001c780})
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:261 +0x1be
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:222 +0x79
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 113
	/Users/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:218 +0x486
@defo89 defo89 added the bug Something isn't working label Jul 31, 2024
@hardikdr hardikdr linked a pull request Jul 31, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Backlog to Done in Metal Automation Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant