Bug 1669240 - [v2v][OSP][RHV]Migrating over SSH transformation method with names containing spaces such as `rhel 7`, fails to migrate
Summary: [v2v][OSP][RHV]Migrating over SSH transformation method with names containing...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.11.z
Assignee: Fabien Dupont
QA Contact: Shveta
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
: 1669286 (view as bug list)
Depends On: 1727275
Blocks: TRACKER-bugs-affecting-libguestfs 1668816 1678385
TreeView+ depends on / blocked
 
Reported: 2019-01-24 17:31 UTC by Kedar Kulkarni
Modified: 2020-03-18 08:06 UTC (History)
12 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1678385 (view as bug list)
Environment:
Last Closed: 2020-03-18 08:06:26 UTC
Category: Bug
Cloudforms Team: V2V
Target Upstream Version:


Attachments (Terms of Use)
virt-v2v-wrapper-log (3.67 KB, text/plain)
2019-01-24 17:31 UTC, Kedar Kulkarni
no flags Details
virt-v2v-logs (2.45 KB, text/plain)
2019-01-24 17:32 UTC, Kedar Kulkarni
no flags Details


Links
System ID Priority Status Summary Last Updated
Github ManageIQ manageiq-v2v issues 886 None closed [v2v][OSP][RHV]Migration with VDDK transformation method fails when used a VM with International Characters or with VM w... 2020-03-18 07:56:28 UTC

Description Kedar Kulkarni 2019-01-24 17:31:46 UTC
Created attachment 1523256 [details]
virt-v2v-wrapper-log

Description of problem:
Migrating to OSP over SSH transformation method with names containing international chars, such as `�Ää`,  fails with  :

[   3.5] Opening the source -i vmx ssh://root@10.8.58.29/vmfs/volumes/env-esxi67-ims-h01_localdisk/�Ää/�Ää.vmx
virt-v2v: error: remote vmx 
‘ssh://root@10.8.58.29/vmfs/volumes/env-esxi67-ims-h01_localdisk/�Ää/�Ää.vmx’ 
could not be parsed as a URI


Version-Release number of selected component (if applicable):
CFME - 5.10.0.32.20190115185124_c957ada 
ovirt-ansible-v2v-conversion-host-1.9.1-2.el7ev.noarch
OSP - 14 (qe's baremetal)


How reproducible:
100%


Steps to Reproduce:
1. Migrate vm with SSH transformation method.


Actual results:
Vm name getting change


Expected results:
Should give original vm name

Comment 2 Kedar Kulkarni 2019-01-24 17:32:31 UTC
Created attachment 1523257 [details]
virt-v2v-logs

Comment 6 Kedar Kulkarni 2019-01-24 17:40:53 UTC
This applies to the VMs with Spaces in name as well.

[   4.9] Opening the source -i vmx ssh://root@10.8.58.30/vmfs/volumes/env-vcenter67-ims-iscsi-netapp-rdu-01b/rhel7 kk/rhel7 kk.vmx
virt-v2v: error: remote vmx 
‘ssh://root@10.8.58.30/vmfs/volumes/env-vcenter67-ims-iscsi-netapp-rdu-01b/rhel7 
kk/rhel7 kk.vmx’ could not be parsed as a URI

Comment 7 Tomáš Golembiovský 2019-01-24 17:49:25 UTC
IMHO this is different issue from what we saw in bug 1661913. CFME will need to properly encode the unicode characters in URI.

Comment 8 Tomáš Golembiovský 2019-01-24 17:50:22 UTC
I wonder if this broken for RHV too or it just works differently there.

Comment 9 Kedar Kulkarni 2019-01-24 19:27:25 UTC
This is broken for RHV as well. Exactly in same way.

Comment 12 Richard W.M. Jones 2019-01-30 13:47:14 UTC
As Tomas said, this is a bug in whatever creates that URL.  You have to
pass a valid URL, eg. by %-escaping any characters.  To quote from the
manual:

http://libguestfs.org/virt-v2v.1.html#vmx:-construct-the-ssh-uri

|  VMX: Construct the SSH URI
|
|  When using the SSH input transport you must specify a remote ssh://...
|  URI pointing to the VMX file. A typical URI looks like:
|
|   ssh://root@esxi.example.com/vmfs/volumes/datastore1/my%20guest/my%20guest.vmx
|
|  Any space must be escaped with %20 and other non-ASCII characters may also need to be URI-escaped.

For Unicode codepoints you must convert them to UTF-8 and percent encode
the bytes.

Comment 15 Fabien Dupont 2019-02-12 20:49:18 UTC
@Tomas, @Richard, should we also encode other options such as RHV Cluster name, RHV storage domain name and OpenStack project name ?

Comment 16 Fabien Dupont 2019-02-12 21:12:44 UTC
https://github.com/ManageIQ/manageiq/pull/18451

Comment 17 Tomáš Golembiovský 2019-02-13 09:35:24 UTC
(In reply to Fabien Dupont from comment #15)
> @Tomas, @Richard, should we also encode other options such as RHV Cluster
> name, RHV storage domain name and OpenStack project name ?

No, only the URI. Other fields should stay in Unicode (and be encoded only by JSON writer).

Comment 19 Fabien Dupont 2019-02-26 20:49:19 UTC
*** Bug 1669286 has been marked as a duplicate of this bug. ***

Comment 20 Richard W.M. Jones 2019-03-04 11:16:05 UTC
(In reply to Fabien Dupont from comment #15)
> @Tomas, @Richard, should we also encode other options such as RHV Cluster
> name, RHV storage domain name and OpenStack project name ?

As Tomas says.  I would also say let's address other problems if they
arise.  However more testing is always helpful - I encourage everyone
to create the weirdest named storage domains / OS projects etc etc :-)

Comment 21 Satoe Imaishi 2019-04-02 14:52:35 UTC
Also need: https://github.com/ManageIQ/manageiq-content/pull/509

Comment 22 Shveta 2019-07-02 21:51:27 UTC
Verification blocked by infra ssh issue ... investigating it.

Comment 23 Shveta 2019-07-31 17:24:47 UTC
Vm's with space and international chars in name are not displayed in VM list in migration plan .
Is this expected ?

Comment 24 Fabien Dupont 2019-08-01 07:21:13 UTC
Are you checking against RHV or OpenStack ? For RHV, it's normal because RHV doesn't support spaces or international chars for VM names.

Comment 25 Shveta 2019-08-01 15:06:48 UTC
It's for RHV .
Not able to verify for OSP because of https://bugzilla.redhat.com/show_bug.cgi?id=1727275

Comment 26 Shveta 2019-08-19 18:52:24 UTC
Checked on OSP , The plan does not filter (or makes the VM unselectable) the VM's with name containing space or international chars.
Appliance : https://10.16.5.88
5.11.0.19.20190813184334_ed72c9f.


Can we filter these VM's for OSP too just like RHV .

Comment 27 Shveta 2019-08-20 01:05:24 UTC
We discussed on another BZ earlier that OSP does not support international chars https://bugzilla.redhat.com/show_bug.cgi?id=1678385#c18.

Hence atleast VM's with international chars in name should be filtered out .

Comment 28 Shveta 2019-08-20 01:09:36 UTC
Migration failing with space in VM name which is tracked here https://bugzilla.redhat.com/show_bug.cgi?id=1685948

Comment 29 Fabien Dupont 2019-08-20 06:59:58 UTC
The initial error was that international characters would make virt-v2v fail. OpenStack DOES SUPPORT international characters, so we don't filter out VMs with international characters in their name.
The validation here is to run a migration of a VM with international characters in its name from VMware to OSP over SSH.

Comment 30 Richard W.M. Jones 2019-08-20 07:56:57 UTC
Note virt-v2v has an ‘-on’ option which allows you to rename the VM during
conversion.

Comment 31 Fabien Dupont 2019-08-21 13:55:05 UTC
Tomas reminded us that there's a BZ about international characters in OSP: https://bugzilla.redhat.com/show_bug.cgi?id=1661913. It's fixed in RHOSP 15.
In the current code, we don't check the provider version. We could propose another PR to adjust the validation rules for OSP. We don't have a RHOSP environment in our lab, so we'll depend only on QE for testing.
Moving back to ON_DEV.

Comment 32 Fabien Dupont 2020-03-18 08:06:26 UTC
Closing as it is implemented in CFME 5.11.4 and we won't backport to 5.10.


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