Bug 1909656

Summary: A migration plan can be edited while it is running
Product: Migration Toolkit for Containers Reporter: Sergio <sregidor>
Component: UIAssignee: Ian <ibolton>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: medium    
Version: 1.4.0CC: chezhang, ernelson, rjohnson, rpattath, whu, xjiang
Target Milestone: ---   
Target Release: 1.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: 2021-02-11 12:55: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:

Description Sergio 2020-12-21 10:12:06 UTC
Description of problem:
When a migration plan is running, some options should be disabled, like edit, rollback, stage or migrate. Now we can click on all those options while the migration plan is running.


Version-Release number of selected component (if applicable):
MTC 1.4.0 stage

How reproducible:
Always

Steps to Reproduce:
1. Create a namespace
oc new-project bz-test

2. Create a migration plan for this namespace

3. Run the migration plan

4. Click on the migration plan's kebab while the migration is still running.


Actual results:
All actions in the kebab are enabled and can be executed. Edit, migrate, stage, rollback....


Expected results:
Options like edit, rollback, stage, migrate... should be disabled while the migration plan is running.


Additional info:

Comment 1 Ian 2021-01-05 19:49:59 UTC
Unable to reproduce on latest - checking with Sergio.

Comment 2 Ian 2021-01-05 20:23:35 UTC
Correction - I am able to see this now when attempting to migrate an empty namespace. 

Seeing this condition show up which is unhandled by the UI: 

  - category: Advisory
    lastTransitionTime: "2021-01-05T20:17:48Z"
    message: The migrations plan is in suspended state; Limited validation enforced;
      PV discovery and resource reconciliation suspended.
    status: "True"
    type: Suspended

This condition is showing up alongside a ready condition which is throwing off our logic.

Comment 3 Ian 2021-01-06 14:32:45 UTC
PR merged and cherry picked https://github.com/konveyor/mig-ui/pull/1098

Comment 7 Xin jiang 2021-01-11 13:30:19 UTC
verified.

"registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:6f53fa6c8ea2648736ced2d38ebb2ead46d3975f71d7efe4bd24e6fec223aaee",
"registry.redhat.io/rhmtc/openshift-migration-ui-rhel8@sha256:fd41dd77250c8dfe068263bdc0f1b9a05b2355ca3c163a998794a75f33523627",

Comment 9 errata-xmlrpc 2021-02-11 12:55: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 (Migration Toolkit for Containers (MTC) tool image release advisory 1.4.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:5329