Bug 1002246 - Accents in the vm name break the migration
Summary: Accents in the vm name break the migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.3.0
Assignee: Martin Betak
QA Contact: Lukas Svaty
URL:
Whiteboard: virt
Depends On:
Blocks: 3.3snap3
TreeView+ depends on / blocked
 
Reported: 2013-08-28 17:27 UTC by David Caro
Modified: 2016-06-26 23:51 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-01-21 16:14:05 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0040 0 normal SHIPPED_LIVE vdsm bug fix and enhancement update 2014-01-21 20:26:21 UTC
oVirt gerrit 19684 0 None None None Never
oVirt gerrit 21521 0 None None None Never

Description David Caro 2013-08-28 17:27:39 UTC
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
    self._updateDevicesDomxmlCache(srcDomXML)
  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 17:32:53 UTC
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 17:39:32 UTC
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
    srcVolUUID=volume.BLANK_UUID)
  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 17:42:28 UTC
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 06:28:46 UTC
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 13:12:32 UTC
tested in is25

Comment 7 errata-xmlrpc 2014-01-21 16:14:05 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.

http://rhn.redhat.com/errata/RHBA-2014-0040.html


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