Bug 1879969 - [v2v] The vpx:// URL is not encoded and white spaces make the import fail
Summary: [v2v] The vpx:// URL is not encoded and white spaces make the import fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.6.0
Assignee: Filip Krepinsky
QA Contact: Ilanit Stein
URL:
Whiteboard: ux_issue
Depends On:
Blocks: 1879973
TreeView+ depends on / blocked
 
Reported: 2020-09-17 13:18 UTC by Fabien Dupont
Modified: 2023-12-15 19:24 UTC (History)
8 users (show)

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
Clone Of:
: 1879973 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:41:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Failed pod log with white space in cluster name (68.41 KB, text/plain)
2020-09-17 13:18 UTC, Fabien Dupont
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6783 0 None closed Bug 1879969: properly encode vpx URL 2021-02-07 05:28:15 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:42:10 UTC

Description Fabien Dupont 2020-09-17 13:18:29 UTC
Created attachment 1715221 [details]
Failed pod log with white space in cluster name

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

Comment 1 Fabien Dupont 2020-09-17 13:21:08 UTC
@Tomas, do you think this can be fixed in 4.5.z?

Comment 2 Tomas Jelinek 2020-09-17 13:30:28 UTC
yes, let me target it to 4.6 and clone to 4.5

Comment 3 Pino Toscano 2020-09-17 15:04:57 UTC
Note that is not just about whitespaces: you make sure that the URL is properly percent-encoded.

Comment 4 Tomas Jelinek 2020-09-24 05:59:33 UTC
have to move out of 4.6 blocker list but definitely want to fix asap

Comment 6 Ilanit Stein 2020-10-01 12:38:47 UTC
Tested on CNV-2.5 deployed from osbs on Sep 30 2020.
Seems fix is not included yet.

Comment 7 Tomas Jelinek 2020-10-01 16:45:15 UTC
Given the patch has been merged Sep 30 there is a good chance that not yet included in your build.

Comment 9 Ilanit Stein 2020-10-11 13:59:00 UTC
Verified CNV-2.5 deployed latest on Oct 09 2020.

RHEL-7 VM import from VMware to CNV ended successfully using Cluster name "New Cluster".

Comment 11 errata-xmlrpc 2020-10-27 16:41:54 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.6 GA 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/RHBA-2020:4196


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