method pick_disk_driver_name() in nova/virt/libvirt/utils.py should return "file" for Xen using non-blockdevices

Bug #1084618 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Christian Berendt

Bug Description

In nova/virt/libvirt/utils.py the method pick_disk_driver_name() returns "tap" for non-blockdevices on Xen. This leads to the following exception on the xend service:

[2012-11-29 18:14:37 16450] ERROR (SrvBase:88) Request new failed.
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvBase.py", line 85, in perform
    return op_method(op, req)
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvDomainDir.py", line 131, in op_new
    raise XendError("Error creating domain: " + str(ex))
XendError: Error creating domain: Invalid Configuration: tap:raw not a valid disk type

The returned driver name should be "file" instead of "tap".

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

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

Reviewed: https://review.openstack.org/17126
Committed: http://github.com/openstack/nova/commit/35c4962c0b97bae5b8751d316d5822fe22c1ab6a
Submitter: Jenkins
Branch: master

commit 35c4962c0b97bae5b8751d316d5822fe22c1ab6a
Author: Christian Berendt <email address hidden>
Date: Thu Nov 29 18:18:55 2012 +0100

    use file instead of tap for non-blockdevice images on Xen

    In nova/virt/libvirt/utils.py the method pick_disk_driver_name() returns
    "tap" for non-blockdevices on Xen. This leads to an exception on the
    xend service. The returned driver name should be "file" instead of
    "tap".

    fixes bug 1084618

    Change-Id: Ib87f18f56afb3c5f34c30e9aea605dad24a36cdf

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Low
tags: added: folsom-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
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/19624

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

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

commit 2adf6399b43102b5998f4779e6976b2b5296de6f
Author: Yufang Zhang <email address hidden>
Date: Mon Jan 14 21:02:40 2013 +0800

    libvirt: use tap for non-blockdevice images on Xen

    This patch reverts 35c4962c0b97bae5b8751d316d5822fe22c1ab6a: 'use
    file instead of tap for non-blockdevice images on Xen', which breaks
    qcow2 disk working on Xen. If the method pick_disk_driver_name()
    returns 'file' for qcow2 format, we would get the following disk XML
    snippet:

        <disk type="file" device="disk">
          <driver name="file" type="qcow2" cache="none"/>
          <source file="/data/instances/instance-00000081/disk"/>
          <target bus="xen" dev="hda"/>
        </disk>

    which produces configuration in the xen tools like:

        "file:/data/instances/instance-00000081/disk,hda,w"

    Guest would not boot successfully, as Xen doesn't think of disk format
    as qcow2. Instead, 'tap' works with both raw and qcow2 disk.

    For LP#1084618, I think it is related with libvirt verion. In my
    deployment(libvirt-1.0.1), 'tap' dirver could produce correct
    configuration for both raw and qcow2 disk format.

    Change-Id: I636b2fed366474e2ae8c3b52403e3085724b24f0

Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
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/32379

tags: added: libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/32379
Committed: http://github.com/openstack/nova/commit/5c6269a6d0c6fbe13120f9a559fb2fc45542674f
Submitter: Jenkins
Branch: master

commit 5c6269a6d0c6fbe13120f9a559fb2fc45542674f
Author: Alvaro Lopez Garcia <email address hidden>
Date: Fri Jun 7 11:01:16 2013 +0200

    Select disk driver for libvirt+Xen according to the Xen version

    There are two versions of the blktap [1] driver available under Xen.
    blktap1 has been replaced by blktap2 that does not support "tap"
    devices but "tap2", therefore we should use "tap2" devices by default.

    Fixes bug 1188517
    Fixes bug 1084618
    DocImpact

    Change-Id: I8b46885b0909de7cb51fd2d0f6ba2e9bcbf33cc6

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.