Skip to content

Commit

Permalink
Fix deletion of the wrong RD
Browse files Browse the repository at this point in the history
see comment: RamenDR#1429 (comment)

Signed-off-by: Benamar Mekhissi <[email protected]>
  • Loading branch information
BenamarMk committed Jun 12, 2024
1 parent f7c511c commit 78e5a1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/volsync/vshandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ func (v *VSHandler) CleanupRDNotInSpecList(rdSpecList []ramendrv1alpha1.VolSyncR
foundInSpecList := false

for _, rdSpec := range rdSpecList {
if rd.GetName() == getReplicationDestinationName(rdSpec.ProtectedPVC.Name) {
if rd.GetName() == getReplicationDestinationName(rdSpec.ProtectedPVC.Name) &&
rd.GetNamespace() == rdSpec.ProtectedPVC.Namespace {
foundInSpecList = true

break
Expand Down

0 comments on commit 78e5a1f

Please sign in to comment.