Bug 1002246 - Accents in the vm name break the migration
Accents in the vm name break the migration
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: 3.3.0
Assigned To: Martin Betak
Lukas Svaty
Depends On:
Blocks: 3.3snap3
  Show dependency treegraph
Reported: 2013-08-28 13:27 EDT by David Caro
Modified: 2016-06-26 19:51 EDT (History)
9 users (show)

See Also:
Fixed In Version: is25
Doc Type: Bug Fix
Doc Text:
Previously, accents in the virtual machine name caused migration to fail. This update adds UTF-8 encoding of the configuration XML on the destination to handle non-ASCII characters, so virtual machines with accents can now migrate successfully.
Story Points: ---
Clone Of:
Last Closed: 2014-01-21 11:14:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19684 None None None Never
oVirt gerrit 21521 None None None Never

  None (edit)
Description David Caro 2013-08-28 13:27:39 EDT
Description of problem:
When creating a vm with accents (òìǹàẁéú...) in the name, once it's up and running if you try to migrate it, vdsm throws an exception like this one:

Thread-1159::ERROR::2013-08-28 20:14:51,367::BindingXMLRPC::993::vds::(wrapper) unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/BindingXMLRPC.py", line 979, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/BindingXMLRPC.py", line 345, in vmMigrationCreate
    return vm.migrationCreate(params)
  File "/usr/share/vdsm/API.py", line 508, in migrationCreate
    if not v.waitForMigrationDestinationPrepare():
  File "/usr/share/vdsm/vm.py", line 4830, in waitForMigrationDestinationPrepare
  File "/usr/share/vdsm/vm.py", line 4801, in _updateDevicesDomxmlCache
    devices = _domParseStr(xml).childNodes[0]. \
  File "/usr/lib64/python2.6/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib64/python2.6/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib64/python2.6/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 40: ordinal not in range(128)

On the destination host and the migration fails.

Version-Release number of selected component (if applicable):
3.3.0 - is12

How reproducible:
Create a vm with at least one accent in the name, start it and try to migrate it to another host.

Steps to Reproduce:
1.Create vm with accent in the name
2.Start it
3.Migrate it

Actual results:
Migration failed

Expected results:
Migration suceeded

Additional info:
It does not happen with accent only in the disk name, only breaks when the acecnts are in the vm name.
Comment 1 David Caro 2013-08-28 13:32:53 EDT
If you stop the vm, change the bonded host, and start again it starts correctly in the new host.
Comment 2 David Caro 2013-08-28 13:39:32 EDT
It also breaks the template creation:

eb03ddd-a8e3-46b9-a178-aa9d28314a6d::ERROR::2013-08-28 20:36:14,648::task::850::TaskManager.Task::(_setError) Task=`aeb03ddd-a8e3-46b9-a178-aa9d28314a6d`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 857, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/storage/task.py", line 318, in run
    return self.cmd(*self.argslist, **self.argsdict)
  File "/usr/share/vdsm/storage/securable.py", line 68, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1747, in copyImage
    postZero, force)
  File "/usr/share/vdsm/storage/image.py", line 735, in copy
  File "/usr/share/vdsm/storage/sd.py", line 411, in createVolume
    preallocate, diskType, volUUID, desc, srcImgUUID, srcVolUUID)
  File "/usr/share/vdsm/storage/volume.py", line 513, in create
    (volUUID, e))
VolumeCreationError: Error creating a new volume: ("Volume creation 8a4a64a6-2a02-4f50-bd65-a1fe091ad548 failed: 'ascii' codec can't encode character u'\\xf3' in position 1: ordinal not in range(128)",)
Comment 3 David Caro 2013-08-28 13:42:28 EDT
Sorry, the template creation is broken if the non-ascii chars are in the disk name, it does not matter if they are in the vm name, I'll open a new bug for it.
Comment 4 Itamar Heim 2013-08-29 02:28:46 EDT
we were supposed to handle unicode vm names in 3.2. is the DC version >= 3.2?
QE - please make sure there is an automated test for this
Comment 6 Lukas Svaty 2013-11-27 08:12:32 EST
tested in is25
Comment 7 errata-xmlrpc 2014-01-21 11:14:05 EST
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.


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