Skip to content

Check for PVC label selector conflicts against the secondary cluster - cherrypick PR#1855 #2021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pruthvitd
Copy link
Member

@pruthvitd pruthvitd commented Apr 30, 2025

Applying PVC Label Conflict Check on the Secondary Cluster

The PR introduces a mechanism in vrg_volrep.go and vrg_volsync.go that applies the PVCLabelSelector from the secondary VRG and checks whether any PVCs are selected.

Expected behavior:

A secondary VRG should not match any PVCs using the PVCLabelSelector.
If a PVC is selected on the secondary cluster, it indicates a conflict because the label selector should not apply to unintended PVCs after failover/relocation.
In case of a conflict, the reconciliation process will be required, and the VRG will log the issue.
For VolSync, the behavior is slightly different, if the label selector matches any PVC that is not part of RDSpec, it is considered a conflict.

Fix for : #1861
Fix for : #2022

@pruthvitd pruthvitd marked this pull request as ready for review April 30, 2025 11:50
@pruthvitd pruthvitd force-pushed the conflict-pvc branch 6 times, most recently from 3c4e401 to 36b1eae Compare April 30, 2025 14:37
Handles the PVC conflict across primary and secondary clusters.
And priotize the conflict on primary cluster over the secondary.

Signed-off-by: pruthvitd <[email protected]>
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.

2 participants