lvmcluster: Clean up stale node finalizers and annotations#1937
lvmcluster: Clean up stale node finalizers and annotations#1937jlhuilier-1a wants to merge 1 commit intoopenshift:mainfrom
Conversation
…ent-driven controller LVMVolumeGroup objects accumulate annotations with the prefix wiped.devices.lvms.openshift.io/ (one per node) that are never cleaned up when nodes are deleted, causing annotations to exceed Kubernetes' 256KB limit and resulting in vg-manager reconciliation errors. Add cleanupNodeAnnotations() to remove stale node annotations and move existing finalizer cleanup from poll-based LVMCluster reconciliation to the dedicated node removal controller. This provides event-driven cleanup at the precise moment of LVMVolumeGroupNodeStatus deletion, eliminating race conditions and improving efficiency by targeting the specific deleted node rather than scanning all VolumeGroups on every reconciliation. Changes: - Add cleanupNodeAnnotations() to remove stale wiped-devices annotations - Move cleanupNodeFinalizers() from LVMCluster to node removal controller - Clean up before NodeStatus deletion to ensure no orphaned references - Remove checkStaleNodeFinalizers() from LVMCluster controller (moved) Signed-off-by: Jerome LHUILIER <jerome.lhuilier@amadeus.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jlhuilier-1a The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @jlhuilier-1a! It looks like this is your first PR to openshift/lvm-operator 🎉 |
|
Hi @jlhuilier-1a. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
LVMVolumeGroup objects accumulate annotations with the prefix
wiped.devices.lvms.openshift.io/ (one per node) that are never cleaned up
when nodes are deleted, causing annotations to exceed Kubernetes' 256KB
limit and resulting in vg-manager reconciliation errors.
Add cleanupNodeAnnotations() to remove stale node annotations and move
existing finalizer cleanup from poll-based LVMCluster reconciliation to the
dedicated node removal controller. This provides event-driven cleanup at the
precise moment of LVMVolumeGroupNodeStatus deletion, eliminating race
conditions and improving efficiency by targeting the specific deleted node
rather than scanning all VolumeGroups on every reconciliation.