Comment 2 for bug 1664032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.openstack.org/433104
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=a6e789f27edc5cae84a786f3d3604cc6546820d7
Submitter: Jenkins
Branch: master

commit a6e789f27edc5cae84a786f3d3604cc6546820d7
Author: Gorka Eguileor <email address hidden>
Date: Sun Feb 12 01:58:46 2017 +0100

    Fix iSCSI multipath rescan

    iSCSI multipath rescan uses iscsiadm --rescan option for nodes and
    sessions, which can end up recreating devices that had just been removed
    if there's a race condition between the removal of a SCSI device and the
    connection of a volume.

    The race condition happens if a rescan done when attaching happens right
    between us removing the path and removing the exported lun, because the
    rescan will add not only the new path we are attaching, but the old path
    we are removing, since the lun still hasn't been removed.

    This would leave orphaned devices that unnecessarily pollute our
    environment,

    This patch narrows the rescan to only rescan for the specific target id,
    channel, and lun number if we can find this information.

    When we cannot find this information we do the scan as we were doing it
    before.

    Closes-Bug: #1664032
    Change-Id: I1b3bd34db260165a6ea9ca061f946d6dfcf8553f