Description of problem ====================== Validation of DRPolicy without any DRClusters passess, but it would make more sense if it failed, so that the validation is aligned with ODF DR web UI, which doesn't allow one to create such empty policy. Version-Release number of selected component ============================================ OCP: - c1: 4.11.0-0.nightly-2022-08-19-151011 - c2: 4.11.0-0.nightly-2022-08-19-091806 - hub 4.11.0-0.nightly-2022-08-19-151011 ACM 2.5.1 ODF 4.11.0-137 (4.11 GA) How reproducible ================ 100% Steps to Reproduce ================== 1. Deploy and configure clusters for Metro DR. 2. Create DRPolicy "testing-policy" with 2 clusters (if you alreay have a valid DRPolicy created, you can reuse the clusters which are part of it). 3. Edit DRPolicy "testing-policy" and drop both DR Clusters from the spec. 4. Check DRPolicy validation status. Actual results ============== Validation DRPolicy/testing-policy without any DR Clusters passess: ``` $ oc get DRPolicy/testing-policy -o yaml apiVersion: ramendr.openshift.io/v1alpha1 kind: DRPolicy metadata: creationTimestamp: "2022-08-31T12:08:01Z" finalizers: - drpolicies.ramendr.openshift.io/ramen generation: 4 labels: cluster.open-cluster-management.io/backup: resource ocsqe: "2022-08-31" name: testing-policy resourceVersion: "22523313" uid: 0d005ac8-118c-4fd8-a338-1e6668cda5f6 spec: replicationClassSelector: {} schedulingInterval: 0m volumeSnapshotClassSelector: {} status: conditions: - lastTransitionTime: "2022-08-31T12:12:51Z" message: drpolicy validated observedGeneration: 4 reason: Succeeded status: "True" type: Validated ``` Expected results ================ Validation of an empty DRPolicy fails.
@rgowdege Can you please add the Fixed in version ?
Version: -------- OCP - 4.12.0-0.nightly-2023-01-04-203333 ODF - quay.io/rhceph-dev/ocs-registry:4.12.0-156 ACM - 2.7 Test: ----- * Removed drcluster list from drpolicy and DRpolicy validation failed as expected. hence moving this to verified $ oc get drpolicy -o yaml apiVersion: v1 items: - apiVersion: ramendr.openshift.io/v1alpha1 kind: DRPolicy metadata: creationTimestamp: "2023-01-09T13:44:56Z" finalizers: - drpolicies.ramendr.openshift.io/ramen generation: 3 labels: cluster.open-cluster-management.io/backup: resource name: ocpcluster1-ocpcluster2 resourceVersion: "6375963" uid: 5b8c8f24-56a1-4ae0-9313-c82e577e09bf spec: drClusters: [] replicationClassSelector: {} schedulingInterval: 0m volumeSnapshotClassSelector: {} status: conditions: - lastTransitionTime: "2023-01-09T16:53:22Z" message: missing DRClusters list in policy observedGeneration: 3 reason: ValidationFailed status: "False" type: Validated kind: List metadata: