Bug 1972895

Summary: CDI importer pod fails when VMware password contains special characters
Product: Container Native Virtualization (CNV) Reporter: Matthew Arnold <marnold>
Component: V2VAssignee: Matthew Arnold <marnold>
Status: CLOSED ERRATA QA Contact: Amos Mastbaum <amastbau>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.6.3CC: cnv-qe-bugs, danken, fdupont, istein, mrashish, pelauter
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-cdi-importer v4.8.0-24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 14:32:39 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 Matthew Arnold 2021-06-16 20:10:01 UTC
Description of problem:
When VMware credentials contain spaces or other special characters, CDI importer pod fails immediately with: 

E0616 16:23:55.206058       1 vddk-datasource.go:285] Unable to create VMware URL: parse "https://administrator@vsphere.local:Testing": invalid port ":Testing" after host

(Where the password in question is "Testing#123".)

Version-Release number of selected component (if applicable):
MTV-2.0.0 GA

How reproducible:
100%

Steps to Reproduce:
1. Set VMware credentials secret in CDI to have a '#' character in the password
2. Import a data volume from VMware using YAML that references the bad credentials
3. Observe the failure in the importer pod log

Actual results:
Importer fails immediately.

Expected results:
Importer should continue to log in to VMware to continue the import.

Additional info:
The importer places the password directly into a URL parser, and fails because it is not encoded correctly.

Comment 2 Amos Mastbaum 2021-07-06 12:28:25 UTC
Fabian/Matthew 
If we use vmio secret with wrong password, the import process wiil fail before the importer pod is created.
that means we need to change the VMware password to verify this BZ.
Are there other ways to verify you can suggest?

Comment 3 Matthew Arnold 2021-07-06 13:35:27 UTC
The easiest way is to create a new administrative user account on the VMware side. The secret should have a correct password that contains a special character, that way the import will fail without the fix and succeed with the fix applied.

Comment 4 Amos Mastbaum 2021-07-06 14:36:02 UTC
Verified

Versions:
CNV 4.8.0-451 iib 86746
MTV 2.1.0-21 iib 88402
OCP 4.8.0-rc.1

Comment 7 errata-xmlrpc 2021-07-27 14:32:39 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: OpenShift Virtualization 4.8.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/RHSA-2021:2920

Comment 8 Red Hat Bugzilla 2023-09-15 01:09:58 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days