Bug 2057516

Summary: [MTC UI] UI should not allow PVC mapping for Full migration
Product: Migration Toolkit for Containers Reporter: Prasad Joshi <prajoshi>
Component: UIAssignee: Mike Turley <mturley>
Status: CLOSED ERRATA QA Contact: mohamed <midays>
Severity: high Docs Contact: Richard Hoch <rhoch>
Priority: high    
Version: 1.7.0CC: ernelson, midays, rjohnson
Target Milestone: ---   
Target Release: 1.7.1   
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: 2022-05-05 13:50:01 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:
Attachments:
Description Flags
migplan_screenshot none

Description Prasad Joshi 2022-02-23 14:58:06 UTC
Created attachment 1862978 [details]
migplan_screenshot

Description of problem: Migration is getting failed when source PVC is mapped with different destination PVC. UI should not allow pvc mapping for Full migration.


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

How reproducible: Always


Steps to Reproduce:

1. Create a new project in a source cluster and deploy an application with PVC.
  $ oc new-project test
  $  oc new-app cakephp-mysql-persistent
2. Login to the MTC UI and Click on "Create migplan" button
3. Enter the plan name
4. Select migration type as a Full migration
5. Select target and source cluster.
6. In copy options wizard, PVC edit icon/button is visible. 

Actual results: Edit button is enabled for Full migration


Expected results: PVC mapping is not supported for Full migration. Edit option should be disabled for Full migration.


Additional info: Attached screenshot

When I execute the cutover migration, it fails and shows the below error in migmigration resource

$ oc get migmigration -o yaml migration-454e2
  - category: Critical
    lastTransitionTime: "2022-02-23T11:39:33Z"
    message: One or more source PVCs are mapped to different destination PVCs. Stage/Final migrations are not possible. Please remove PVC mappings.
    reason: NotSupported
    status: "True"
    type: InvalidSpec

Comment 1 Erik Nelson 2022-03-01 17:34:35 UTC
This is not desirable and the controller is blocking the behavior from occurring. Since this shouldn't be considered a blocking issue, moving to 1.7.1.

Comment 8 errata-xmlrpc 2022-05-05 13:50:01 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 (Moderate: Migration Toolkit for Containers (MTC) 1.7.1 security and 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-2022:1734