Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1777340

Summary: Azure cluster check box appears unchecked after adding Azure cluster
Product: OpenShift Container Platform Reporter: Xin jiang <xjiang>
Component: Migration ToolingAssignee: Danil Grigorev <dgrigore>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.zCC: apinnick, chezhang, dgrigore, ernelson, jmatthew, sregidor, whu
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1778911 (view as bug list) Environment:
Last Closed: 2019-12-19 15:44:27 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:
Bug Depends On: 1778911    
Bug Blocks:    

Description Xin jiang 2019-11-27 13:06:30 UTC
Description of problem:
The checkbox of Azure cluster is checked while adding Azure cluster in App Migration console, try to edit the cluster and the checkbox of Azure cluster is showing unchecked.

Version-Release number of selected component (if applicable):
OCP 4.2 cluster on Azure
$ oc get clusterversions
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.2.0-0.nightly-2019-11-25-200935   True        False         25h       Cluster version is 4.2.0-0.nightly-2019-11-25-200935


How reproducible:
always

Steps to Reproduce:
1. Setup two ocp 4.2 cluster on Azures and install app migration on both clusters
2. login to app migration console
3. click 'Add Cluster'
4. add the source cluster to make the 'Azure cluster' checked and fill in 'Azure resource group'
5. click 'Close' to finish adding cluster
6. Edit the cluster above steps added 

Actual results:
'Azure cluster' is unchecked. In fact, it has 'azureResourceGroup: preserve-xjiang42e-jm7j8-rg'

oc -n openshift-migration get migclusters ocp42esource -o yaml
apiVersion: migration.openshift.io/v1alpha1
kind: MigCluster
metadata:
  annotations:
    touch: 536740bb-9fa8-43af-ac95-5879c8ec1399
  creationTimestamp: 2019-11-27T12:17:38Z
  generation: 2
  name: ocp42esource
  namespace: openshift-migration
  resourceVersion: "494312"
  selfLink: /apis/migration.openshift.io/v1alpha1/namespaces/openshift-migration/migclusters/ocp42esource
  uid: e6a7e45f-110f-11ea-aa56-000d3aa4508e
spec:
  azureResourceGroup: preserve-xjiang42e-jm7j8-rg
  isHostCluster: false
  serviceAccountSecretRef:
    name: ocp42esource
    namespace: openshift-config
  storageClasses:
  - accessModes:
    - ReadWriteOnce
    default: true
    name: managed-premium
    provisioner: kubernetes.io/azure-disk
  url: https://api.preserve-xjiang42e.qe.azure.devcluster.openshift.com:6443
status:
  conditions:
  - category: Required
    lastTransitionTime: 2019-11-27T12:17:47Z
    message: The cluster is ready.
    status: "True"
    type: Ready

Expected results:
'Azure cluster' should be checked

Additional info:

Comment 2 Erik Nelson 2019-12-10 19:06:44 UTC
https://github.com/fusor/mig-ui/pull/633

Comment 4 Sergio 2019-12-17 15:52:54 UTC
Verified in 1.0.1 osbs images.

The Azure cluster configuration is shown properly when the user saves the cluster and edit it later. The checkbox and the resource group are stored and displayed without problems.

Comment 6 errata-xmlrpc 2019-12-19 15:44:27 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-2019:4304