libvirt: use_cow_images=false and force_raw_images=false broken

Bug #1163009 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Vish Ishaya
Grizzly
Fix Released
Medium
Vish Ishaya

Bug Description

Repro Steps:

 1. set in nova.conf use_cow_images=false
 2. set in nova.conf force_raw_images=false
 3. upload a qcow2 image to glance
 4. boot an instance from the image

Results:

 Instance does not boot correctly

Expected:

 Instance boots

Revision history for this message
Vish Ishaya (vishvananda) wrote :

The xml generated by libvirt uses raw for the device type:

    <disk type="file" device="disk">
      <driver name="qemu" type="raw" cache="none"/>
      <source file="/mnt/instances/instance-00000001/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>

The type should be different depending on the type of the image that is downloaded from glance.

summary: - use_cow_images=false and force_raw_images=false broken
+ libvirt: use_cow_images=false and force_raw_images=false broken
Changed in nova:
importance: Undecided → Medium
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/25845

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25845
Committed: http://github.com/openstack/nova/commit/494a3cb5749d52aa90daeacd980362df5f971c0d
Submitter: Jenkins
Branch: master

commit 494a3cb5749d52aa90daeacd980362df5f971c0d
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Apr 1 14:19:49 2013 -0700

    libvirt: Get driver type from base image type.

    If we are using the raw backend (no cow), we should set the driver
    type based on the type of the source image instead of always
    using raw.

    Calls to to_xml were moved after _create_image so that the image
    type could be determined when creating the xml for libvirt.

    Fixes bug 1163009

    Change-Id: Ic8d5f0ab83d868a42f834d39c0afb64818d7e027

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/26617

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/26617
Committed: http://github.com/openstack/nova/commit/44d42e20657ddb9f25cec62f7c3ddebba6d9cd7a
Submitter: Jenkins
Branch: stable/grizzly

commit 44d42e20657ddb9f25cec62f7c3ddebba6d9cd7a
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Apr 1 14:19:49 2013 -0700

    libvirt: Get driver type from base image type.

    If we are using the raw backend (no cow), we should set the driver
    type based on the type of the source image instead of always
    using raw.

    Calls to to_xml were moved after _create_image so that the image
    type could be determined when creating the xml for libvirt.

    Fixes bug 1163009

    Change-Id: Ic8d5f0ab83d868a42f834d39c0afb64818d7e027
    (cherry picked from commit 494a3cb5749d52aa90daeacd980362df5f971c0d)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.