Skip to content

Conversation

abhilashshetty04
Copy link
Member

@abhilashshetty04 abhilashshetty04 commented Sep 3, 2025

When a Kubernetes node is removed from the cluster while it still has existing PVCs/LVMVolumes, those volumes become orphaned. If a PVC is deleted in this state, the LocalPV-LVM CSI controller marks the corresponding LVMVolume CR for deletion by adding a deletion timestamp.

Normally, the node-agent running on the worker node is responsible for cleaning up the logical volume (LV) and removing the finalizer from the CR. However, in this scenario, the node no longer exists, so there is no agent running to perform the cleanup.

This fix leverages the condition of the Kubernetes Node being absent: in such cases, the CSI controller itself removes the finalizer and cleans up the LVMVolume CR.

Fixes: #407

@abhilashshetty04 abhilashshetty04 requested a review from a team as a code owner September 3, 2025 08:43
@abhilashshetty04 abhilashshetty04 changed the title make delete call idempotent when node is removed from cluster make delete volume idempotent when node is removed from cluster Sep 3, 2025
@abhilashshetty04 abhilashshetty04 force-pushed the lvmvolume_leak_fix branch 2 times, most recently from 724d553 to 1671fcc Compare September 5, 2025 06:24
…e volume is not present

Signed-off-by: Abhilash Shetty <abhilash.shetty@datacore.com>
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.

Slow leak of LVMVolume Kubernetes objects causes extremely slow allocation of new volumes

1 participant