-
Notifications
You must be signed in to change notification settings - Fork 66
Description
The test VolumeReplicationGroupRecipe failed occasionally with the following info:
[FAIL] VolumeReplicationGroupRecipe Controller [DeferCleanup (Each)] when a VRG, referencing a recipe, in an administrator namespace specifies only other namespaces statically lists only their PVCs in the VRG's status
/home/nlevanon/workspace/RamenDR/ramen/internal/controller/vrg_recipe_test.go:252
Test Logs:
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Found 27 PVCs using label selector app.kubernetes.io/created-by notin (volsync),ramendr.openshift.io/created-by-ramen notin (true) {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Found PersistentVolumeClaims {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "count": 2}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Kube object protection store dummy {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Entering processing VolumeReplicationGroup for deletion {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Fetching PersistentVolumeClaims {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "pvcSelector": "app.kubernetes.io/created-by notin (volsync),ramendr.openshift.io/created-by-ramen notin (true),ramendr.openshift.io/owner-name=a,ramendr.openshift.io/owner-namespace-name=ns-envtest"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Found 0 PVCs using label selector app.kubernetes.io/created-by notin (volsync),ramendr.openshift.io/created-by-ramen notin (true),ramendr.openshift.io/owner-name=a,ramendr.openshift.io/owner-namespace-name=ns-envtest {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup.PvcsDeselectedUnprotect Selected PVCS owned by VRG {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "count": 0, "namespaces": "ns-envtest"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup pvc does not contain VR protection finalizer. Skipping it {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "pvc": "test-vrg-namespace-bgw8f/a"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup pvc does not contain VR protection finalizer. Skipping it {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "pvc": "test-vrg-namespace-hqggq/a"}
2025-10-12T17:28:24.794+0300 INFO controllers.VolumeReplicationGroup Kube object protection configuration is enabled for operation deletion {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "is disabled in vrg": false, "is disabled in configMap": false}
[FAILED] in [DeferCleanup (Each)] - /home/nlevanon/workspace/RamenDR/ramen/internal/controller/vrg_recipe_test.go:252 @ 10/12/25 17:28:25.792
2025-10-12T17:28:25.798+0300 INFO pvcmap.VolumeReplicationGroup Update event for PersistentVolumeClaim
2025-10-12T17:28:25.798+0300 INFO pvcmap.VolumeReplicationGroup Skipping handling of VR as PVC is not bound {"pvc": "test-vrg-namespace-bgw8f/a", "pvcPhase": "Pending"}
2025-10-12T17:28:25.798+0300 INFO pvcmap.VolumeReplicationGroup Not Requeuing {"pvc": "test-vrg-namespace-bgw8f/a", "oldPVC Phase": "Pending", "newPVC phase": "Pending"}
2025-10-12T17:28:25.802+0300 INFO pvcmap.VolumeReplicationGroup Update event for PersistentVolumeClaim
2025-10-12T17:28:25.802+0300 INFO pvcmap.VolumeReplicationGroup Skipping handling of VR as PVC is not bound {"pvc": "test-vrg-namespace-hqggq/a", "pvcPhase": "Pending"}
2025-10-12T17:28:25.802+0300 INFO pvcmap.VolumeReplicationGroup Not Requeuing {"pvc": "test-vrg-namespace-hqggq/a", "oldPVC Phase": "Pending", "newPVC phase": "Pending"}
2025-10-12T17:28:25.806+0300 INFO pvcmap.VolumeReplicationGroup Update event for PersistentVolumeClaim
2025-10-12T17:28:25.806+0300 INFO pvcmap.VolumeReplicationGroup Skipping handling of VR as PVC is not bound {"pvc": "test-vrg-namespace-sgm6x/a", "pvcPhase": "Pending"}
2025-10-12T17:28:25.806+0300 INFO pvcmap.VolumeReplicationGroup Not Requeuing {"pvc": "test-vrg-namespace-sgm6x/a", "oldPVC Phase": "Pending", "newPVC phase": "Pending"}
2025-10-12T17:28:25.807+0300 INFO controllers.VolumeReplicationGroup Kube objects recover requests deleted {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true}
2025-10-12T17:28:25.807+0300 INFO controllers.VolumeReplicationGroup Delete cluster data in {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true, "s3Profiles": ["NoS3"]}
2025-10-12T17:28:25.807+0300 INFO controllers.VolumeReplicationGroup NoS3 available to clean {"vrg": {"name":"a","namespace":"ns-envtest"}, "rid": "292c0d41", "State": "primary", "Finalize": true}
<< Timeline
[FAILED] Timed out after 1.002s.
The matcher passed to Eventually returned the following error:
<*errors.errorString | 0xc004635c40>:
Expected an error, got nil
{
s: "Expected an error, got nil",
}
In [DeferCleanup (Each)] at: /home/nlevanon/workspace/RamenDR/ramen/internal/controller/vrg_recipe_test.go:252 @ 10/12/25 17:28:25.792
The RC of the tests that the validation of the deletion doesn't wait for the completion of the deletion
Need to change line 252 from:
Eventually(vrgGet).Should(MatchError(k8serrors.NewNotFound(
schema.GroupResource{
Group: ramen.GroupVersion.Group,
Resource: "volumereplicationgroups",
},
vrg.Name,
)))
To wait for deletion to complete:
Eventually(vrgGet, time.Second10, time.Millisecond100).Should(MatchError(k8serrors.NewNotFound(
schema.GroupResource{
Group: ramen.GroupVersion.Group,
Resource: "volumereplicationgroups",
},
vrg.Name,
And add the time package to the list of imports e.g. line 9 after the standard package imports