Libvirt multipath test fails on a system with real iSCSI devices

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

Bug Description

The libvirt test_libvirt_kvm_iser_volume_with_multipath_getmpdev expects a system with no real iscsi devices. It fudges the list of block devices, but will still end up with a call to _get_iscsi_devices() which will actually walk the system /dev/disk/by-path/ip-* entries and return them. On a system with no iscsi devices, this is fine, but on one with some, it will end up failing like this:

======================================================================
FAIL: nova.tests.virt.libvirt.test_libvirt_volume.LibvirtVolumeTestCase.test_libvirt_kvm_iser_volume_with_multipath_getmpdev
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "nova/tests/virt/libvirt/test_libvirt_volume.py", line 524, in test_libvirt_kvm_iser_volume_with_multipath_getmpdev
    libvirt_driver.disconnect_volume(connection_info, 'vde')
  File "nova/openstack/common/lockutils.py", line 246, in inner
    return f(*args, **kwargs)
  File "nova/virt/libvirt/volume.py", line 601, in disconnect_volume
    return self._disconnect_volume_multipath_iscsi(iser_properties)
  File "nova/virt/libvirt/volume.py", line 355, in _disconnect_volume_multipath_iscsi
    for device in devices]
  File "nova/virt/libvirt/volume.py", line 685, in _get_multipath_iqn
    return entry.split("iser-")[1].split("-lun")[0]
IndexError: list index out of range
======================================================================

Tags: libvirt
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/49592

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/49592
Committed: http://github.com/openstack/nova/commit/3891692191fb8738fdf6fc171ac531e1869d825c
Submitter: Jenkins
Branch: master

commit 3891692191fb8738fdf6fc171ac531e1869d825c
Author: Dan Smith <email address hidden>
Date: Thu Oct 3 10:17:15 2013 -0700

    Fix libvirt test on systems with real iSCSI devices

    The test_libvirt_kvm_iser_volume_with_multipath_getmpdev() test
    expects a system with no real iSCSI devices. It actually triggers
    an os.walk() of /dev/disk/by-path/ip-*, which will return any
    iSCSI devices on the system. Since the test expects none, this
    will cause the test to fail.

    This patch just stubs that out to return an empty list always.

    Change-Id: Ibb3fd18207d013c35487a3eebb336b5f288b703a
    Closes-bug: #1234834

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