← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1730756] [NEW] Creating a VM with a non-ASCII name fails with an Unicode error

 

Public bug reported:

Creating a VM with a non-ASCII name in nova with the libvirt driver
fails with an UnicodeEncodeError error.

Instance failed to spawn: UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 294: ord
Traceback (most recent call last):
  File "/opt/stack/nova/nova/compute/manager.py", line 2208, in _build_resources
    yield resources
  File "/opt/stack/nova/nova/compute/manager.py", line 2001, in _build_and_run_instance
    block_device_info=block_device_info)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2821, in spawn
    destroy_disks_on_failure=True)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5289, in _create_domain_and_network
    destroy_disks_on_failure)
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5259, in _create_domain_and_network
    post_xml_callback=post_xml_callback)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5170, in _create_domain
    guest = libvirt_guest.Guest.create(xml, self._host)
  File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 129, in create
    encodeutils.safe_decode(xml))
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 125, in create
    guest = host.write_instance_config(xml)
  File "/opt/stack/nova/nova/virt/libvirt/host.py", line 826, in write_instance_config
    domain = self.get_connection().defineXML(xml)
  File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
    result = proxy_call(self._autowrap, f, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
    rv = execute(f, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
    six.reraise(c, e, tb)
  File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
    rv = meth(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3817, in defineXML
    ret = libvirtmod.virDomainDefineXML(self._o, xml)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 294: ordinal not in range(128)

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1730756

Title:
  Creating a VM with a non-ASCII name fails with an Unicode error

Status in OpenStack Compute (nova):
  New

Bug description:
  Creating a VM with a non-ASCII name in nova with the libvirt driver
  fails with an UnicodeEncodeError error.

  Instance failed to spawn: UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 294: ord
  Traceback (most recent call last):
    File "/opt/stack/nova/nova/compute/manager.py", line 2208, in _build_resources
      yield resources
    File "/opt/stack/nova/nova/compute/manager.py", line 2001, in _build_and_run_instance
      block_device_info=block_device_info)
    File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2821, in spawn
      destroy_disks_on_failure=True)
    File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5289, in _create_domain_and_network
      destroy_disks_on_failure)
    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5259, in _create_domain_and_network
      post_xml_callback=post_xml_callback)
    File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5170, in _create_domain
      guest = libvirt_guest.Guest.create(xml, self._host)
    File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 129, in create
      encodeutils.safe_decode(xml))
    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
      self.force_reraise()
    File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
      six.reraise(self.type_, self.value, self.tb)
    File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 125, in create
      guest = host.write_instance_config(xml)
    File "/opt/stack/nova/nova/virt/libvirt/host.py", line 826, in write_instance_config
      domain = self.get_connection().defineXML(xml)
    File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit
      result = proxy_call(self._autowrap, f, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call
      rv = execute(f, *args, **kwargs)
    File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute
      six.reraise(c, e, tb)
    File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker
      rv = meth(*args, **kwargs)
    File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3817, in defineXML
      ret = libvirtmod.virDomainDefineXML(self._o, xml)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 294: ordinal not in range(128)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1730756/+subscriptions


Follow ups