Bug 2179308 - [RFE] Block disable DR for the application when peer is not ready
Summary: [RFE] Block disable DR for the application when peer is not ready
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: management-console
Version: 4.13
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Timothy Asir
QA Contact: Prasad Desala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-17 09:47 UTC by gowtham
Modified: 2023-08-09 16:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-28 08:17:44 UTC
Embargoed:


Attachments (Terms of Use)

Description gowtham 2023-03-17 09:47:27 UTC
Description of problem (please be detailed as possible and provide log
snippests):
The current 4.13 UI is allowing disabling DR at any time. Users can trigger disable DR for any applicationSet even if the DRPC peer is not in a peer-ready state.

Version of all relevant components (if applicable):


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?


Can this issue reproduce from the UI?
100%

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Configure GitOPS server

---
# Create cluster Set in openshift-gitops namespace
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSet
metadata:
  name: all-openshift-clusters
spec:
  clusterSelector:
    labelSelector: 
      matchLabels:
        vendor: OpenShift
    selectorType: LabelSelector

---
# Creates a ManagedClusterSetBinding to the openshift-gitops project
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
  name: all-openshift-clusters
  namespace: openshift-gitops
spec:
  clusterSet: all-openshift-clusters

---
# Create placement to choose managed clusters from cluster set
apiVersion: cluster.open-cluster-management.io/v1beta1
kind: Placement
metadata:
  name: all-openshift-clusters
  namespace: openshift-gitops
spec:
  predicates:
  - requiredClusterSelector:
      labelSelector:
        matchExpressions:
        - key: vendor
          operator: "In"
          values:
          - OpenShift
---
# Creates a gitopscluster resource
# Requires: Openshift-GitOps operator be installed in the project "openshift-gitops"
apiVersion: apps.open-cluster-management.io/v1beta1
kind: GitOpsCluster
metadata:
  name: gitops-cluster-sample
  namespace: openshift-gitops
spec:
  argoServer:
    cluster: local-cluster
    argoNamespace: openshift-gitops
  placementRef:
    kind: Placement
    apiVersion: cluster.open-cluster-management.io/v1beta1
    name: all-openshift-clusters

---


2. Create ApplicationSet type application from ACM application page.

3. Apply DRPolicy to this newly created application using "Manage ApplicationSet" dual list selection modal. (Move applicaitonSet from left to right and click save).

4. Once the application is protected, down the target cluster will make the peer not ready.

5. Try to disable DR using the same "Manage ApplicationSet" dual list selection modal. (Move applicaitonSet from right to left and click save).


Actual results:
UI allows the user to disable DR even when a peer is not in a ready state.

Expected results:
UI should block and disable DR operation when a peer is not in a ready state.

Additional info:
Allow disabling only when the below conditions are satisfied(status: 'True') in DRPC CR:
status:
  conditions:
    - lastTransitionTime: '2023-03-17T09:28:11Z'
      message: Ready
      observedGeneration: 1
      reason: Success
      status: 'True'
      type: PeerReady
    - lastTransitionTime: '2023-03-17T09:28:11Z'
      message: Initial deployment completed
      observedGeneration: 1
      reason: Deployed
      status: 'True'
      type: Available


Note You need to log in before you can comment on or make changes to this bug.