Skip to content

Conversation

@georgel-ms
Copy link
Contributor

@georgel-ms georgel-ms commented Aug 21, 2024

This is to fix a bug that during workload cluster upgrade, it takes long time to wait for the PV to attach to the new node, we may see multiple errors like this:

I0404 11:45:49.477443 1 event.go:307] "Event occurred" object="default/sample-dddf7bd5-wglbx" fieldPath="" kind="Pod" apiVersion="v1" type="Warning" reason="FailedAttachVolume" message="Multi-Attach error for volume "pvc-d0cec9c7-7d3a-4961-ab35-7bda48cbe5ee" Volume is already used by pod(s) sample-dddf7bd5-7rh7q"

In this PR, we intentionally wait for the PV to detach from the old node before the vm is deleted to avoid the above error.

@georgel-ms georgel-ms force-pushed the georgel-fix-volumedetach branch 2 times, most recently from da44baa to 10b3f10 Compare August 26, 2024 07:28
@georgel-ms georgel-ms changed the title wait for volume attachments to be deleted before deleting a vm wait for volume attachments to be detached before deleting a vm Aug 27, 2024
@georgel-ms georgel-ms force-pushed the georgel-fix-volumedetach branch from 10b3f10 to bdf532c Compare August 27, 2024 08:54
@zawachte
Copy link
Contributor

CAPI is already supposed to wait for the PVs to be detached before scheduling node delete.

@zawachte zawachte merged commit 07aca7b into master Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants