← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1896496] Re: Combination of 'hw_video_ram' image metadata prop, 'hw_video:ram_max_mb' extra spec raises error

 

** Also affects: nova/train
   Importance: Undecided
       Status: New

** Changed in: nova/train
       Status: New => Fix Released

** Also affects: nova/ussuri
   Importance: Undecided
       Status: New

** Changed in: nova/ussuri
       Status: New => Fix Released

-- 
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/1896496

Title:
  Combination of 'hw_video_ram' image metadata prop,
  'hw_video:ram_max_mb' extra spec raises error

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) train series:
  Fix Released
Status in OpenStack Compute (nova) ussuri series:
  Fix Released
Status in OpenStack Compute (nova) victoria series:
  Fix Released

Bug description:
  The 'hw_video_ram' image metadata property is used to configure the
  amount of memory allocated to VRAM. Using it requires specifying the
  'hw_video:ram_max_mb' extra spec or you'll get the following error:

    nova.exception.RequestedVRamTooHigh: The requested amount of video
  memory 8 is higher than the maximum allowed by flavor 0.

  However, specifying these currently results in a libvirt failure.

    ERROR nova.compute.manager [None ...] [instance: 11a71ae4-e410-4856-aeab-eea6ca4784c5] Failed to build and run instance: libvirt.libvirtError: XML error: cannot parse video vram '8192.0'
    ERROR nova.compute.manager [instance: ...] Traceback (most recent call last):
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/compute/manager.py", line 2333, in _build_and_run_instance
    ERROR nova.compute.manager [instance: ...]     accel_info=accel_info)
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3632, in spawn
    ERROR nova.compute.manager [instance: ...]     cleanup_instance_disks=created_disks)
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 6527, in _create_domain_and_network
    ERROR nova.compute.manager [instance: ...]     cleanup_instance_disks=cleanup_instance_disks)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
    ERROR nova.compute.manager [instance: ...]     self.force_reraise()
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
    ERROR nova.compute.manager [instance: ...]     six.reraise(self.type_, self.value, self.tb)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise
    ERROR nova.compute.manager [instance: ...]     raise value
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 6496, in _create_domain_and_network
    ERROR nova.compute.manager [instance: ...]     post_xml_callback=post_xml_callback)
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 6425, in _create_domain
    ERROR nova.compute.manager [instance: ...]     guest = libvirt_guest.Guest.create(xml, self._host)
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 127, in create
    ERROR nova.compute.manager [instance: ...]     encodeutils.safe_decode(xml))
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
    ERROR nova.compute.manager [instance: ...]     self.force_reraise()
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
    ERROR nova.compute.manager [instance: ...]     six.reraise(self.type_, self.value, self.tb)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise
    ERROR nova.compute.manager [instance: ...]     raise value
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 123, in create
    ERROR nova.compute.manager [instance: ...]     guest = host.write_instance_config(xml)
    ERROR nova.compute.manager [instance: ...]   File "/opt/stack/nova/nova/virt/libvirt/host.py", line 1135, in write_instance_config
    ERROR nova.compute.manager [instance: ...]     domain = self.get_connection().defineXML(xml)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/eventlet/tpool.py", line 190, in doit
    ERROR nova.compute.manager [instance: ...]     result = proxy_call(self._autowrap, f, *args, **kwargs)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/eventlet/tpool.py", line 148, in proxy_call
    ERROR nova.compute.manager [instance: ...]     rv = execute(f, *args, **kwargs)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/eventlet/tpool.py", line 129, in execute
    ERROR nova.compute.manager [instance: ...]     six.reraise(c, e, tb)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise
    ERROR nova.compute.manager [instance: ...]     raise value
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/eventlet/tpool.py", line 83, in tworker
    ERROR nova.compute.manager [instance: ...]     rv = meth(*args, **kwargs)
    ERROR nova.compute.manager [instance: ...]   File "/usr/local/lib/python3.6/dist-packages/libvirt.py", line 3703, in defineXML
    ERROR nova.compute.manager [instance: ...]     if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
    ERROR nova.compute.manager [instance: ...] libvirt.libvirtError: XML error: cannot parse video vram '8192.0'
    ERROR nova.compute.manager [instance: ...]

  This appears to be a Python 3 thing, introduced by division of ints
  now returning a float.

  Steps to reproduce:

  1. Set the 'hw_video_ram' image metadata property on an image:

     $ openstack image set --property hw_video_ram=8 $IMAGE

  2. Set the 'hw_video:ram_max_mb' flavor extra spec on a flavor:

     $ openstack flavor update --property hw_video:ram_max_mb=16384
  $FLAVOR

  3. Create a server using this flavor and image:

     $ openstack server create --image $IMAGE --flavor $FLAVOR ... test-
  server

  Expected result:

  Instance should be created with 8MB of VRAM.

  Actual result:

  Instance fails to create.

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


References