libvirt iSCSI driver sets is_block_dev=False

Bug #1273496 reported by iain MacDonnell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Vladik Romanovsky

Bug Description

Trying to use iSCSI with libvirt/Xen, attaching volumes to instances was failing. I tracked this down to the libvirt XML looking like:

<disk type="block" device="disk">
  <driver name="file" type="raw" cache="none"/>
  <source dev="/dev/disk/by-path/ip-192.168.8.11:3260-iscsi-iqn.1986-03.com.sun:02:ecd142ab-b1c7-6bcf-8f91-f55b6c766bcc-lun-0"/>
  <target bus="xen" dev="xvdb"/>
  <serial>e8c640c6-641b-4940-88f2-79555cdd5551</serial>
</disk>

The driver name should be "phy", not "file".

More digging lead to the iSCSI volume driver in nova/virt/libvirt/volume.py, which does:

class LibvirtISCSIVolumeDriver(LibvirtBaseVolumeDriver):
    """Driver to attach Network volumes to libvirt."""
    def __init__(self, connection):
        super(LibvirtISCSIVolumeDriver,
              self).__init__(connection, is_block_dev=False)

Surely is_block_dev should be "True" for iSCSI?? Changing this makes the problem go away - now pick_disk_driver_name() in nova/virt/libvirt/utils.py does the right thing and my volume attaches successfully.

Am I missing something here... ?

Tags: libvirt xen
tags: added: libvirt
tags: added: xen
Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Low
Changed in nova:
assignee: nobody → Vladik Romanovsky (vladik-romanovsky)
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/75438

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/75438
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bb67b0137e8faebc8892c9176775f02f6dbb920b
Submitter: Jenkins
Branch: master

commit bb67b0137e8faebc8892c9176775f02f6dbb920b
Author: Vladik Romanovsky <email address hidden>
Date: Fri Feb 21 10:36:14 2014 -0500

    libvirt: setting a correct driver name for iscsi volumes

    Setting LibvirtISCSIVolumeDriver class to be identified
    as a block device to determine the correct driver name.

    Change-Id: Idfb89d051ccadab1d4c4b05b817b085e094ff992
    Closes-Bug: #1273496

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.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.