qcow image support broken in stable/folsom nova compute

Bug #1183606 reported by Tim Daly Jr.
28
This bug affects 11 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
nova (Ubuntu)
Invalid
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

Nova compute now tries to run qemu-img info on base images before it has downloaded them, resulting in an exception. If the image has already been cached, you won't see it. It looks like the bug was introduced by this security fix: https://bugs.launchpad.net/nova/folsom/+bug/1177830

This is the exception:

  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 191, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 839, in run_instance
    do_run_instance()
  File "/home/timjr/openstack/nova/app/nova/utils.py", line 803, in inner
    retval = f(*args, **kwargs)
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 838, in do_run_instance
    admin_password, is_first_time, instance)
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 529, in _run_instance
    self._set_instance_error_state(context, instance[\'uuid\'])
  File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 517, in _run_instance
    is_first_time, request_spec, filter_properties)
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 503, in _run_instance
    injected_files, admin_password)
  File "/home/timjr/openstack/nova/app/nova/compute/manager.py", line 756, in _spawn
    block_device_info)
  File "/home/timjr/openstack/nova/app/nova/exception.py", line 117, in wrapped
    temp_level, payload)
  File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()
  File "/home/timjr/openstack/nova/app/nova/exception.py", line 92, in wrapped
    return f(*args, **kw)
  File "/home/timjr/openstack/nova/app/nova/virt/libvirt/driver.py", line 1099, in spawn
    admin_pass=admin_password)
  File "/home/timjr/openstack/nova/app/nova/virt/libvirt/driver.py", line 1365, in _create_image
    project_id=instance[\'project_id\'])
  File "/home/timjr/openstack/nova/app/nova/virt/libvirt/imagebackend.py", line 131, in cache
    *args, **kwargs)
  File "/home/timjr/openstack/nova/app/nova/virt/libvirt/imagebackend.py", line 181, in create_image
    if size and size < disk.get_disk_size(base):
  File "/home/timjr/openstack/nova/app/nova/virt/disk/api.py", line 115, in get_disk_size
    size = images.qemu_img_info(path)[\'virtual size\']
  File "/home/timjr/openstack/nova/app/nova/virt/images.py", line 50, in qemu_img_info
    \'qemu-img\', \'info\', path)
  File "/home/timjr/openstack/nova/app/nova/utils.py", line 210, in execute
    cmd=\' \'.join(cmd))

I have a fix I'll submit.

Tim Daly Jr. (timjr)
Changed in nova:
assignee: nobody → Tim Daly Jr. (timjr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/30373

Changed in nova:
assignee: Tim Daly Jr. (timjr) → nobody
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/folsom)

Reviewed: https://review.openstack.org/30373
Committed: http://github.com/openstack/nova/commit/d2cb0f0e4974952cac8abe459a157f34a823a982
Submitter: Jenkins
Branch: stable/folsom

commit d2cb0f0e4974952cac8abe459a157f34a823a982
Author: Tim Daly, Jr <email address hidden>
Date: Thu May 23 23:13:58 2013 +0000

    Download the image template prior to checking its size.

    Change-Id: I07aa6eef0e08baad8c3068b3546dfcf11da98ae2
    Fixes: bug #1183606

Changed in nova (Ubuntu Quantal):
status: New → Fix Released
Changed in nova (Ubuntu):
status: New → Invalid
tags: added: verification-done
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
WcMinor (risingofthemoon) wrote :

Hi, this is affecting to the ubuntu 12.04 users, as me, is there any plan to upgrade the ubuntu folsom package?

Sean Dague (sdague)
no longer affects: nova/folsom
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.