mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
This PR fixes issue #32727. When an attach operation fails, it is still possible that the volume will be attached to the node later. This PR adds the logic to record the volume to node with attached state no matter whether the operation succedded or not. If the operation fails, mark the attached state to false. If the operation succeeded, mark the attached state to true. The reconciler will still issue attach operation until it returns successfully. If the pod is removed in the mean time, the reconciler will issue detach operations for all the volumes no matter what is the attached state.