When doing multipathed Fibre Channel we may end up not flushing the volume when disconnecting it if we had not found a multipath when doing the connection.
The output we would see is something like this:
2020-09-28 19:12:58.481 8 WARNING os_brick.initiator.linuxscsi [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] couldn't find a valid multipath device path for 360002ac000000000000002ae00020e19: VolumeDeviceNotFound: Volume device not found at /dev/mapper/360002ac000000000000002ae00020e19.
2020-09-28 19:12:58.580 8 DEBUG os_brick.initiator.connectors.fibre_channel [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] devices to remove = [{'device': u'/dev/sdc', 'host': u'1', 'id': u'1', 'channel': u'0', 'lun': u'3'}, {'device': u'/dev/sdd', 'host': u'1', 'id': u'0', 'channel': u'0', 'lun': u'3'}, {'device': u'/dev/sde', 'host': u'4', 'id': u'0', 'channel': u'0', 'lun': u'3'}, {'device': u'/dev/sdf', 'host': u'4', 'id': u'1', 'channel': u'0', 'lun': u'3'}] disconnect_volume /usr/lib/python2.7/site-packages/os_brick/initiator/connectors/fibre_channel.py:348
2020-09-28 19:12:58.581 8 DEBUG os_brick.initiator.linuxscsi [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] Remove SCSI device /dev/sdc with /sys/block/sdc/device/delete remove_scsi_device /usr/lib/python2.7/site-packages/os_brick/initiator/linuxscsi.py:76
2020-09-28 19:12:58.702 8 DEBUG os_brick.initiator.linuxscsi [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] Remove SCSI device /dev/sdd with /sys/block/sdd/device/delete remove_scsi_device /usr/lib/python2.7/site-packages/os_brick/initiator/linuxscsi.py:76
2020-09-28 19:12:58.821 8 DEBUG os_brick.initiator.linuxscsi [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] Remove SCSI device /dev/sde with /sys/block/sde/device/delete remove_scsi_device /usr/lib/python2.7/site-packages/os_brick/initiator/linuxscsi.py:76
2020-09-28 19:12:58.947 8 DEBUG os_brick.initiator.linuxscsi [req-2c678262-2d40-4ab4-885c-c7739660cce3 32f4d8f9d6034b599847b64f5ed8bf9e 0e6846fd5af64d0e8c0b5682b56dfd81 - default default] Remove SCSI device /dev/sdf with /sys/block/sdf/device/delete remove_scsi_device /usr/lib/python2.7/site-packages/os_brick/initiator/linuxscsi.py:76
This is caused by the `connect_volume` call returning a real path instead of a symlink, which makes the disconnect code think that this was a multipath when looking if it has to do a flush on one of the individual paths.
Fix proposed to branch: master /review. opendev. org/755478
Review: https:/