libvirt_kvm_volume_with_multipath test fails on osx

Bug #1130841 reported by Vish Ishaya
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Vish Ishaya

Bug Description

ERROR: nova.tests.test_libvirt_volume.LibvirtVolumeTestCase.test_libvirt_kvm_volume_with_multipath
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:'nova'

Traceback (most recent call last):
  File "/Users/vishvananda/os/nova/nova/tests/test_libvirt_volume.py", line 390, in test_libvirt_kvm_volume_with_multipath
    libvirt_driver.disconnect_volume(connection_info, 'vde')
  File "/Users/vishvananda/os/nova/nova/openstack/common/lockutils.py", line 242, in inner
    retval = f(*args, **kwargs)
  File "/Users/vishvananda/os/nova/nova/virt/libvirt/volume.py", line 278, in disconnect_volume
    for device in devices]
  File "/Users/vishvananda/os/nova/nova/virt/libvirt/volume.py", line 396, in _get_multipath_iqn
    entries = self._get_iscsi_devices()
  File "/Users/vishvananda/os/nova/nova/virt/libvirt/volume.py", line 381, in _get_iscsi_devices
    return [entry for entry in list(os.walk('/dev/disk/by-path'))[0][-1]
IndexError: list index out of range

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

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

commit fe5382819a8e21d3c32832d92c41477df21c34fa
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Feb 20 10:53:40 2013 -0800

    libvirt: fix volume walk of /dev/disk/by-path

    If /dev/disk/by-path does not exist, then _get_iscsi_devices() will
    raise an IndexError. Handle this case and return an empty list. This
    fixes a test on OSX.

    Fixes bug 1130841

    Change-Id: Ibae2f1238feac9a10b8dc2b74886ea59edac0bcc

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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