remove_multipath_device is used incorrectly in ISCSIConnector.disconnect_volume

Bug #1353889 reported by Jeegn Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Jeegn Chen

Bug Description

Currently in cinder/brick/initiator/connector.py, ISCSIConnector.disconnect_volume will try to remove multipatch device like this:

 multipath_device = self._get_multipath_device_name(host_device)
 if multipath_device:
    device_realpath = os.path.realpath(host_device)
    self._linuxscsi.remove_multipath_device(device_realpath)

But actually LinuxSCSI.remove_multipath_device is expecting a device UUID
instead of device_realpath, therefore remove_multipath_device will do nothing due to incorrect input.

The code should be changed to
 multipath_device = self._get_multipath_device_name(host_device)
 if multipath_device:
    self._linuxscsi.remove_multipath_device(
        multipath_device.split('/')[3])

Jeegn Chen (jeegn-chen)
description: updated
Jeegn Chen (jeegn-chen)
Changed in cinder:
assignee: nobody → Jeegn Chen (jeegn-chen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/112550

Changed in cinder:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Jeegn Chen (<email address hidden>) on branch: master
Review: https://review.openstack.org/112550
Reason: Not able to reproduce the issue and original implementation works.

Revision history for this message
Jeegn Chen (jeegn-chen) wrote :

Not able to reproduce the issue and original implementation works.
Dismiss the bug.

Changed in cinder:
status: In Progress → Invalid
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.