QemuImageInfo() can't succeed because QemuImageInfo requires first argument

Bug #1157412 reported by Sean Dague
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Davanum Srinivas (DIMS)

Bug Description

In nova/virt/image.py if we ever manage to get to:

def qemu_img_info(path):
    """Return an object containing the parsed output from qemu-img info."""
    if not os.path.exists(path):
        return QemuImgInfo()

    out, err = utils.execute('env', 'LC_ALL=C', 'LANG=C',
                             'qemu-img', 'info', path)
    return QemuImgInfo(out)

and path does not exist, we throw an exception, as QemuImgInfo requires at least one argument.

We should probably fix it by making out="" in the QemuImgInfo constructor.

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24839

Changed in nova:
status: New → In Progress
Sean Dague (sdague)
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24839
Committed: http://github.com/openstack/nova/commit/2b3a2979fe0c6cc41088c19fab5908a86cc855e3
Submitter: Jenkins
Branch: master

commit 2b3a2979fe0c6cc41088c19fab5908a86cc855e3
Author: Davanum Srinivas <email address hidden>
Date: Tue Mar 19 17:25:02 2013 -0400

    Fix missing argument to QemuImageInfo

    set the default value for cmd_output to None. _parse
    does work fine with None or empty string

    Fixes LP# 1157412

    Change-Id: Ib63f2fd227633b96db613ce29563d1929536819a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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