Cluster status.phase gets "Failed" forever once FailureMessage or FailureReason is set #10847
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/support
Categorizes issue or PR as a support question.
needs-priority
Indicates an issue lacks a `priority/foo` label and requires one.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What steps did you take and what happened?
There was a problem related to infrastructure, the provider reported the error to CAPI which wrote it to
status.failureMessage
andstatus.failureReason
field in Cluster CR. The problem got resolved but the cluster phase was never updated and the error message is still thereWhat did you expect to happen?
I expected the
status.phase
to become "Provisioned" and the fieldsstatus.failureMessage
andstatus.failureReason
to be cleanedCluster API version
1.7.1
Kubernetes version
1.28.5
Anything else you would like to add?
I was reading CAPI code when I noticed that the fields
status.failureMessage
andstatus.failureReason
are never updated if they aren't defined. So if they were set with an error, they would always have that error until they get a new error. The code where the fields are update (or not): https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/controllers/cluster/cluster_controller_phases.go#L130-L144Label(s) to be applied
/kind bug
The text was updated successfully, but these errors were encountered: