Requeue instead of logging reconciler errors when owners not set on CloudStackMachine yet
/kind bug
What steps did you take and what happened:
During reconciliation of a cluster, in several places GetParent gets called (which calls GetOwnerOfKind). 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:
- Cluster-api-provider-cloudstack version: HEAD
- Kubernetes version: (use
kubectl version): 1.27.3 - OS (e.g. from
/etc/os-release):
@hrak is that still an issue?
yes!
This is a completely valid issue. However, since it's not a show stopper bug (it seems to me is more of a nice day to day improvement), moving it to the v0.5 milestone
/triage accept /milestone v0.5.0
@g-gaston: The label(s) triage/accept cannot be applied, because the repository doesn't have them.
In response to this:
This is a completely valid issue. However, since it's not a show stopper bug (it seems to me is more of a nice day to day improvement), moving it to the v0.5 milestone
/triage accept /milestone v0.5.0
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.
/triage accepted