Bug 1972895 - CDI importer pod fails when VMware password contains special characters
Summary: CDI importer pod fails when VMware password contains special characters
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: V2V
Version: 2.6.3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.8.0
Assignee: Matthew Arnold
QA Contact: Amos Mastbaum
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-16 20:10 UTC by Matthew Arnold
Modified: 2023-09-15 01:09 UTC (History)
6 users (show)

Fixed In Version: virt-cdi-importer v4.8.0-24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 14:32:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 1837 0 None open URL-encode special characters in VDDK credentials. 2021-06-17 20:45:13 UTC
Github kubevirt containerized-data-importer pull 1838 0 None closed [release-v1.34] URL-encode special characters in VDDK credentials. 2021-06-23 08:07:40 UTC
Red Hat Product Errata RHSA-2021:2920 0 None None None 2021-07-27 14:33:33 UTC

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


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