Requeue instead of logging reconciler errors when owners not set on CloudStackMachine yet #299
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Milestone
/kind bug
What steps did you take and what happened:
During reconciliation of a cluster, in several places
GetParent
gets called (which callsGetOwnerOfKind
). When the CloudStackMachines do not have an owner yet, this results in a whole bunch of reconciler errors being logged like so:E0726 12:18:22.767591 1 controller.go:329] "msg"="Reconciler error" "error"="couldn't find owner of kind Machine in namespace default" "CloudStackMachine"={"name":"hrak-cluster-control-plane-nrr5m","namespace":"default"} "controller"="cloudstackmachine" "controllerGroup"="infrastructure.cluster.x-k8s.io" "controllerKind"="CloudStackMachine" "name"="hrak-cluster-control-plane-nrr5m" "namespace"="default" "reconcileID"="04d91e20-21a8-4b8b-b04e-c57b4c01067f"
Maybe this can be adapted so that it re queues this step in the same way that
RequeueIfCloudStackClusterNotReady
does, but then by checking the ownerrefs, to reduce the amount of 'bad news' in the logs.What did you expect to happen:
No errors being logged
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): 1.27.3/etc/os-release
):The text was updated successfully, but these errors were encountered: