Bug 1927785 - Network mapping should be validated before migration
Summary: Network mapping should be validated before migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.0.0
Assignee: Jeff Ortel
QA Contact: Maayan Hadasi
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-11 14:12 UTC by Ilanit Stein
Modified: 2021-06-10 17:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-10 17:11:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:2381 0 None None None 2021-06-10 17:11:37 UTC

Description Ilanit Stein 2021-02-11 14:12:54 UTC
Description of problem:
Migration should fail for a Migration plan that was set via API with 
"wrong network mapping":
1. No network mapping section
2. Source network doesn't exist.
3. Source network exist on the VMware, but is not the network the migrated VM is attached to.

Comment 1 Fabien Dupont 2021-04-07 11:26:15 UTC
I think that cases 2 and 3 are not issues :

2. The mapping can cover network that don't exist and it will not fail the migration, since no VM is attached to a non existing network.
3. The mapping can cover more networks than is needed. The extra mapping won't be used during the migration. And another plan can use the same mapping, with VMs connected to the "extra" networks.

In case #1, there's already a validation and the "map" attribute is required. Moving to ON_QA to verify that.

Comment 2 Maayan Hadasi 2021-04-20 09:47:58 UTC
Verified as fixed
MTV version: 2.0.0-17 / iib:66911


$ cat << EOF | oc apply -f -
> ---
> apiVersion: forklift.konveyor.io/v1alpha1
> kind: Plan
> metadata: 
>   name: plan-no-network
>   namespace: openshift-rhmtv
> spec:
>   map:
>     storage: 
>       name: iscsi-nfs
>       namespace: openshift-rhmtv
>   provider: 
>     destination: 
>       name: host
>       namespace: openshift-rhmtv
>     source: 
>       name: node-05
>       namespace: openshift-rhmtv
>   targetNamespace: openshift-rhmtv
>   vms: 
>     - id: vm-715
> EOF
The Plan "plan-no-network" is invalid: spec.map.network: Required value

Comment 5 errata-xmlrpc 2021-06-10 17:11: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 (MTV 2.0.0 images), 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-2021:2381


Note You need to log in before you can comment on or make changes to this bug.