Bug 1797775

Summary: [MIGUI] Creating a Cluster and Replication Repository of the same name will cause the associated secrets to name-collide
Product: OpenShift Container Platform Reporter: Erik Nelson <ernelson>
Component: Migration ToolingAssignee: Pranav Gaikwad <pgaikwad>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: dymurray, pgaikwad, sregidor
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-28 11:09:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Erik Nelson 2020-02-03 20:35:28 UTC
Description of problem:

Using the CAM UI, if a user chooses to create a Cluster and a Replication Repository using the same name, the UI will try to create a secret for both that uses the same name. The second secret it attempts to create will fail to create because it already exists.

Version-Release number of selected component (if applicable):
1.1.0

How reproducible:
Every time

Steps to Reproduce:
1. Create a Cluster named "foo"
2. Create a Replication Repository named "foo"

Actual results:
Failed creation of the object created 2nd with no warning

Expected results:
UI should either allow it and salt the secrets, and use a display name for the UI, or identify whether or not the object a

Additional info:
Upstream issue - https://github.com/fusor/mig-ui/issues/396

Comment 1 Pranav Gaikwad 2020-03-25 17:51:07 UTC
This is fixed with 
- https://github.com/konveyor/mig-ui/pull/759
- https://github.com/konveyor/mig-ui/pull/769


This needs to be cherry-picked into the release branch

Comment 5 Sergio 2020-05-07 11:46:43 UTC
Verfied using CAM 1.2

We create a cluster named "clustername", and we created a Replication Repository names "clustername" too.

The result was this in the openshift-config namespace

$ oc get secret -n openshift-config | grep clustername
clustername                           Opaque                                2      5m12s
clustername-tzb46                     Opaque                                1      6m1s

The cluster's secret is using generateName to create the secret and the collision does not happen any more.

Comment 7 errata-xmlrpc 2020-05-28 11:09:55 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, 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/RHEA-2020:2326