Bug 2238308 - Should not allow to create a 2nd dr Policy on an existing cluster set with an existing dr policy
Summary: Should not allow to create a 2nd dr Policy on an existing cluster set with an...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: management-console
Version: 4.14
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ODF 4.16.0
Assignee: gowtham
QA Contact: avdhoot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-11 11:13 UTC by Kevin Alon Goldblatt
Modified: 2024-07-17 13:09 UTC (History)
8 users (show)

Fixed In Version: 4.16.0-89
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-07-17 13:09:43 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage odf-console pull 1338 0 None open Bug 2238308: [release-4.16] [MDR] Should not allow to create a 2nd DR policy on existing cluster pair 2024-04-29 06:44:42 UTC
Github red-hat-storage odf-console pull 1339 0 None open Bug 2238308: [release-4.16-compatibility] [MDR] Should not allow to create a 2nd DR policy on existing cluster pair 2024-04-25 15:15:22 UTC
Red Hat Product Errata RHSA-2024:4591 0 None None None 2024-07-17 13:09:45 UTC

Description Kevin Alon Goldblatt 2023-09-11 11:13:05 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Creating a 2nd dr policy on a cluster set with and existing dr policy, leaves the existing policy as Active, but the new policy is Inactive. We should not support this option

Version of all relevant components (if applicable):
Advanced Cluster Management for Kubernetes
2.9.0-103 provided by Red Hat

ODF Multicluster Orchestrator
4.14.0-123.stable provided by Red Hat

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?
We don't create a second polcy

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

Can this issue reproducible?
100%

Can this issue reproduce from the UI?
Yes

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


Steps to Reproduce:
1. Via the UI - Data Services - Data Policy - Create DR Policy
2. On a cluster set with an existing DR policy which is Active, create a 2nd DR Policy >>>>> The second policy is created but Inactive
3. We should not support this option in the first place


Actual results:
Dr policy is created but Inactive

Expected results:
Should get an error "Cannot create a Dr Policy on acluster set with an existing Dr Policy"

Additional info:

Comment 2 Shyamsundar 2023-09-11 19:05:18 UTC
@kgoldbla did you create a DRPolicy across 2 regional clusters or 2 metro clusters?

Creation of a duplicate DRPolicy across 2 metro clusters is forbidden (or should be).

Creation of multiple DRPolicy across 2 regional clusters is supported as there maybe multiple schedule intervals that are desired for different workloads opting into the different DRPolicies.

When you state the new policy is "Inactive" what does that actually mean? and, where do you see this as being inactive?

Comment 4 Kevin Alon Goldblatt 2023-09-12 08:34:44 UTC
(In reply to Shyamsundar from comment #2)
> @kgoldbla did you create a DRPolicy across 2 regional clusters or
> 2 metro clusters?
> 
> Creation of a duplicate DRPolicy across 2 metro clusters is forbidden (or
> should be).
> 
> Creation of multiple DRPolicy across 2 regional clusters is supported as
> there maybe multiple schedule intervals that are desired for different
> workloads opting into the different DRPolicies.

Ok so then this is the desired behavior.

> 
> When you state the new policy is "Inactive" what does that actually mean?
> and, where do you see this as being inactive?

Apologies, The new policy is displayed as being Not Validated

Comment 5 Shyamsundar 2023-09-12 12:19:21 UTC
(In reply to Kevin Alon Goldblatt from comment #4)
> (In reply to Shyamsundar from comment #2)
> > Creation of multiple DRPolicy across 2 regional clusters is supported as
> > there maybe multiple schedule intervals that are desired for different
> > workloads opting into the different DRPolicies.
> 
> Ok so then this is the desired behavior.

I assume then the creation was of 2 Regional DR policies.

> 
> > 
> > When you state the new policy is "Inactive" what does that actually mean?
> > and, where do you see this as being inactive?
> 
> Apologies, The new policy is displayed as being Not Validated

That should not happen, the 2 DRClusters that this DRPolicy is pointing to is already validated (as the first DRPolicy is showing up clean as per the report), further this DRPolicy should not be in an invalidated state. Can you pass along a must-gather from the hub cluster for us to inspect the various resources and logs:
- https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.8/html/troubleshooting/troubleshooting#procedure
  - oc adm must-gather --image=registry.redhat.io/rhacm2/acm-must-gather-rhel8:v2.8.0 --dest-dir=<directory>

Comment 6 Shyamsundar 2023-09-13 14:33:33 UTC
(In reply to Shyamsundar from comment #5)
> (In reply to Kevin Alon Goldblatt from comment #4)
> > (In reply to Shyamsundar from comment #2)
> > > Creation of multiple DRPolicy across 2 regional clusters is supported as
> > > there maybe multiple schedule intervals that are desired for different
> > > workloads opting into the different DRPolicies.
> > 
> > Ok so then this is the desired behavior.
> 
> I assume then the creation was of 2 Regional DR policies.

Based on further understanding of the setup it seems that a subsequent Metro DR policy across the 2 ManagedClusters was allowed for creation from the UI, and that resulted in Ramen reporting the second policy as invalid (as we cannot have more than one Metro DR policy across the same set of clusters). @kgoldbla if you can confirm this, then I would assign this issue to the UI team for required checks before allowing the creation of a duplicate Metro DRPolicy such that the creation itself is forbidden, Thanks!

Comment 7 Kevin Alon Goldblatt 2023-09-13 15:10:01 UTC
This is a Metro DR policy

Comment 17 avdhoot 2024-04-30 09:13:41 UTC
The UI is not allowing to create 2nd DR policy and gives below error.

"
Existing DRPolicy detected
A DRPolicy is already configured for selected managed clusters. You cannot create another DRPolicy using the same pair of clusters.
"

Hence marking it as verified.

Steps Used-
1. Via the UI - Data Services - Data Policy - Create DR Policy
2. On a cluster set with an existing DR policy which is Active, create a 2nd DR Policy.

Attached screenshot of error page.

Product Version-

OCP -4.16
ODF - 4.16.0-90

Comment 20 errata-xmlrpc 2024-07-17 13:09:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.16.0 security, enhancement & bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:4591


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