gardener / machine-controller-manager

Declarative way of managing machines for Kubernetes cluster
Apache License 2.0
257 stars 117 forks source link

`GetMachineStatus` prevents machine deletion in case of `Unitialised` error code #926

Closed rishabh-11 closed 4 months ago

rishabh-11 commented 4 months ago

How to categorize this issue?

/area performance /area robustness /kind bug /priority 1

What happened: With https://github.com/gardener/machine-controller-manager/pull/898, we introduced InitializeMachine in the driver API. There is an edge case here where an initialized machine can cause its deletion to be stuck (See landscape-issues 147). This happens because of the triggerDeletionFlow calls GetMachineStatus in getVMStatus stage. (See https://github.com/gardener/machine-controller-manager/blob/0a6589d500be784c09c9d8e16159bc5f2f1882db/pkg/util/provider/machinecontroller/machine_util.go#L916). The error handling of Unitialized error code is not done here causing the deletion to get stuck.

What you expected to happen: The deletion of an initialized machine should not get stuck.

Anything else we need to know?: