diff --git a/internal/controller/garbage_collector_runner.go b/internal/controller/garbage_collector_runner.go index 1b5039b..ae46744 100644 --- a/internal/controller/garbage_collector_runner.go +++ b/internal/controller/garbage_collector_runner.go @@ -111,7 +111,7 @@ func (r *GarbageCollectorRunner) isMantleRestoreAlreadyDeleted(ctx context.Conte return false, fmt.Errorf("failed to find cluster ID: %s", pv.GetName()) } if r.managedCephClusterID != clusterID { - return false, fmt.Errorf("PV is not managed by target Ceph cluster: %s: %s", clusterID, r.managedCephClusterID) + return false, nil } var restore mantlev1.MantleRestore diff --git a/internal/controller/garbage_collector_runner_test.go b/internal/controller/garbage_collector_runner_test.go index 79ab736..51dbfca 100644 --- a/internal/controller/garbage_collector_runner_test.go +++ b/internal/controller/garbage_collector_runner_test.go @@ -93,6 +93,14 @@ var _ = Describe("garbage collector", func() { }, true, false, ), + Entry( + "cluster ID does not match", + true, + func(pv *corev1.PersistentVolume) { + pv.Spec.CSI.VolumeAttributes["clusterID"] = "different-cluster-id" + }, + false, false, + ), ) })