Bug 1661913 - [V2V][OSP] VM migrations fails if VM name contains international characters
Summary: [V2V][OSP] VM migrations fails if VM name contains international characters
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M3
: 15.0 (Stein)
Assignee: Bernard Cafarelli
QA Contact: Candido Campos
URL:
Whiteboard: v2v
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-24 11:32 UTC by Yadnyawalk Tale
Modified: 2019-09-26 10:47 UTC (History)
15 users (show)

Fixed In Version: python-openstackclient-3.18.0-0.20190312140834.6868499.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-21 11:19:41 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
OpenStack Storyboard 2004356 None None None 2019-01-10 21:32:31 UTC
OpenStack gerrit 633468 None None None 2019-01-29 13:49:36 UTC
OpenStack gerrit 633508 None None None 2019-01-29 13:49:36 UTC
Red Hat Product Errata RHEA-2019:2811 None None None 2019-09-21 11:20:11 UTC

Description Yadnyawalk Tale 2018-12-24 11:32:57 UTC
Description of problem:
For OSP, when migrating VMware VM with a name containing international chars, migration fails. 


Version-Release number of selected component (if applicable):
CFME - 5.10.0.30.20181218191323_900a416
Conversion appliance used - https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=815918


How reproducible:
100%


Steps to Reproduce:
1. Create vm with international chars in cfme (punycodes)
2. Try to migrate it
(Used mapping nfs-nfs mapping, I don't think storage types matters)


Actual results:
Migration fails with 'Convert Disk' status.


Expected results:
VM should be migrate with punycodes. 


Example vm name used: 
ytale2-v2v-طدЩыǪἀ-джум-简体中文-日本語-pê-añ-ça-end


Additional info:
automation.log attached
virt-v2v.log attached

Comment 5 Yadnyawalk Tale 2018-12-24 11:53:40 UTC
See also: similar issue found on RHV -> https://bugzilla.redhat.com/show_bug.cgi?id=1596143

Comment 7 Tomáš Golembiovský 2019-01-07 10:56:49 UTC
This is a bug in Openstack. The 'openstack' command fails when creating port with unicode in the name.
The error from 'openstack' command is:

> 'ascii' codec can't encode characters in position 11-16: ordinal not in range(128)

Comment 8 Tomáš Golembiovský 2019-01-07 10:59:27 UTC
FYI some time back I've been told that international characters are supported and any issues should be reported to Openstack.

Comment 9 Yadnyawalk Tale 2019-01-07 11:09:20 UTC
Thanks for confirming @Tomáš @Brett. 
I am unaware of where to assign this issue right now, can you suggest me/assign this to respective team? Thanks a lot.

Comment 12 Bernard Cafarelli 2019-01-09 19:07:45 UTC
Indeed from log, the openstack port creation fails on unicode characters.

Just retested on devstack master:
$ openstack port create name™ --network private
'ascii' codec can't encode character u'\u2122' in position 4: ordinal not in range(128)

Although legacy CLI works:
$ neutron port-create --name test™ private
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Created a new port:
+-----------------------+-------------------------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                                       |
+-----------------------+-------------------------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                                        |
| allowed_address_pairs |                                                                                                             |
| binding:vnic_type     | normal                                                                                                      |
| created_at            | 2019-01-09T19:05:03Z                                                                                        |
| description           |                                                                                                             |
| device_id             |                                                                                                             |
| device_owner          |                                                                                                             |
| extra_dhcp_opts       |                                                                                                             |
| fixed_ips             | {"subnet_id": "9cb8df7b-c63e-49c3-8b8a-714dfdcc4e6a", "ip_address": "192.168.0.46"}                         |
|                       | {"subnet_id": "65126bf4-95ba-43e4-94f5-ddc5e19084df", "ip_address": "fde2:5b58:fd5b:0:f816:3eff:fe52:c840"} |
| id                    | 7edaa36c-e7f3-49ae-8185-06c5a784a9d8                                                                        |
| mac_address           | fa:16:3e:52:c8:40                                                                                           |
| name                  | test™                                                                                                       |
[...]

So openstack CLI bug? I found similar storyboard (still open):
https://storyboard.openstack.org/#!/story/2004356

Comment 15 Bernard Cafarelli 2019-01-24 16:20:02 UTC
I updated the storyboard link with some additional information. Short version, using OSC CLI with python2 will trigger several issues with real Unicode chains (str() calls do not like them) in python-openstackclient and openstacksdk.

Short-term workarounds, depending on the OpenStack version you want to use and the host system where CLI commands are run:
* Use neutron CLI. This seems to work but this one is deprecated. Recommended for older OpenStack installs
* Run openstack CLI with python3. You only need python3 on the system running the commands, not the nodes themselves. I could manipulate ports and networks with unicode character ™ in their names without an issue

Comment 17 Tomáš Golembiovský 2019-01-24 17:32:29 UTC
(In reply to Bernard Cafarelli from comment #15)

> * Run openstack CLI with python3. You only need python3 on the system
> running the commands, not the nodes themselves. I could manipulate ports and
> networks with unicode character ™ in their names without an issue

This may be a viable workaround for us. Assuming we can get some python3 version on OSP appliance...
Marek/Mike, would that be possible? If yes, which python3 packages/versions should we use to test this.

Comment 24 Bernard Cafarelli 2019-03-05 10:01:25 UTC
Both SDK and CLI patches merged upstream master

Comment 30 errata-xmlrpc 2019-09-21 11:19:41 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, 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/RHEA-2019:2811


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