Bug 1879973

Summary: [v2v] The vpx:// URL is not encoded and white spaces make the import fail
Product: OpenShift Container Platform Reporter: Tomas Jelinek <tjelinek>
Component: Console Kubevirt PluginAssignee: Filip Krepinsky <fkrepins>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: aos-bugs, bthurber, fdupont, fkrepins, gouyang, jcoscia, pkliczew, tjelinek
Target Milestone: ---   
Target Release: 4.5.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux_issue
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: VMware VM's from cluster which had a space in its name (like "New Cluster") could not be imported Consequence: The VM Import failed for such VMs Fix & Result: Clusters with spaces and special characters can be used and such VMs will be imported successfully
Story Points: ---
Clone Of: 1879969 Environment:
Last Closed: 2020-11-05 12:46:56 UTC Type: ---
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: 1879969    
Bug Blocks:    

Description Tomas Jelinek 2020-09-17 13:31:36 UTC
+++ This bug was initially created as a clone of Bug #1879969 +++

Description of problem:

When importing a VMware VM from a cluster named "New Cluster", the migration failed. The virt-v2v log (attached) shows the following messages:


2020-09-16 16:08:54,020 - root - ERROR - virt-v2v error: could not parse '-ic vpx://administrator%40vsphere.local.net/Datacenter/host/New Cluster/vmware7.ciolab.net?no_verify=1'.  Original error message was: parse_uri: unable to parse URI
2020-09-16 16:08:54,021 - root - DEBUG - b"virt-v2v: error: could not parse '-ic \n"
2020-09-16 16:08:54,022 - root - DEBUG - b'vpx://administrator%40vsphere.local.net/Datacenter/host/New \n'
2020-09-16 16:08:54,022 - root - DEBUG - b"Cluster/vmware7.ciolab.net?no_verify=1'.  Original error message was: \n"
2020-09-16 16:08:54,022 - root - DEBUG - b'parse_uri: unable to parse URI\n'


After renaming the cluster to "NewCluster", the import succeeded.
It seems that the white space is not encoded as "%20" which leads virt-v2v to consider it as another argument, no a part of the URL.

Version-Release number of selected component: 4.5.8

--- Additional comment from Fabien Dupont on 2020-09-17 13:21:08 UTC ---

@Tomas, do you think this can be fixed in 4.5.z?

--- Additional comment from Tomas Jelinek on 2020-09-17 13:30:28 UTC ---

yes, let me target it to 4.6 and clone to 4.5

Comment 5 Ilanit Stein 2020-10-30 15:35:49 UTC
Verified on latest 4.5.z, from Oct 30 2020.

VM import from VMware, when VMware cluster name is "New Cluster" ends up successfully.

Comment 7 errata-xmlrpc 2020-11-05 12:46:56 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 (OpenShift Container Platform 4.5.17 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/RHBA-2020:4325