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

Bug 1878663

Summary: Wrong oc command copied to clipboar in debug screen
Product: OpenShift Container Platform Reporter: Sergio <sregidor>
Component: Migration ToolingAssignee: Ian <ibolton>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: chezhang, ernelson, mberube, rjohnson, rpattath, whu, xjiang
Target Milestone: ---   
Target Release: 4.5.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-09-30 18:43:07 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 Sergio 2020-09-14 10:11:33 UTC
Description of problem:
When we click on "View migration plan resources (DEBUG)" on a migration plan in the UI, and we copy the commands to the clipboard, the command copied to the clipboard is wrong.

Version-Release number of selected component (if applicable):
MTC 1.3
SOURCE CLUSTER: azure OCP 4.2
TARGET CLUSTER: azure OCP 4.5
Browser: Chrome

How reproducible:
Always

Steps to Reproduce:
1. Create any migration plan
2. Click on  "View migration plan resources (DEBUG)" for this migration plan
3. Click on the copy to clipboard icon. "Copy `oc get` command"
4. Paste the command on a shell in order to get the resource

Actual results:
The copied command is wrong and we get an error in the shell

This is an example of what we get:

    oc get Plan -n openshift-migration ocp-26292-azuresnapshotbasicvol-migplan-1600076854

There is no Plan resource, the name of the resource is actually MigPlan, and not Plan.

The same happens for the MigMigration resource, the copied command uses Migration instead, which is wrong.

    oc get Migration -n openshift-migration ocp-26292-azuresnapshotbasicvol-mig-1600076854



Expected results:

The resources used in the commands should be MigPlan and MigMigration.


Additional info:

Comment 1 Ian 2020-09-15 19:53:39 UTC
https://github.com/konveyor/mig-ui/pull/1017 Tested on 1.3 env & working.

Comment 5 Sergio 2020-09-17 13:54:28 UTC
Verified using MTC 1.3

openshift-migration-ui-rhel8@sha256:f306de1051cd2029944b2aa9511626b1dce365317fd04168478f14a43ad95e44


The MigPlan command is always disabled and cannot be copied to the clipboard.


We move the BZ to ASSIGNED status.

Comment 6 Ian 2020-09-17 22:00:35 UTC
https://github.com/konveyor/mig-ui/pull/1020 Fixed & added to 1.3 release branch.

Comment 9 Xin jiang 2020-09-21 03:17:19 UTC
verified with MTC 1.3.0
$ oc get pod -n openshift-migration migration-ui-999399751-mwzpn -o yaml  | grep image
  - image: quay-enterprise-quay-enterprise.apps.cam-tgt-8740.qe.devcluster.openshift.com/admin/openshift-migration-ui-rhel8@sha256:d5d2a58977d533d2bd773d6e0403eea9f072a2e09d19efa219fccb3df9b96457
    imagePullPolicy: Always
  imagePullSecrets:
    image: quay-enterprise-quay-enterprise.apps.cam-tgt-8740.qe.devcluster.openshift.com/admin/openshift-migration-ui-rhel8@sha256:d5d2a58977d533d2bd773d6e0403eea9f072a2e09d19efa219fccb3df9b96457
    imageID: docker-pullable://quay-enterprise-quay-enterprise.apps.cam-tgt-8740.qe.devcluster.openshift.com/admin/openshift-migration-ui-rhel8@sha256:d5d2a58977d533d2bd773d6e0403eea9f072a2e09d19efa219fccb3df9b96457

Comment 13 errata-xmlrpc 2020-09-30 18:43:07 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 (Migration Toolkit for Containers (MTC) Tool image release advisory 1.3.0), 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/RHBA-2020:4148