WWN verification fails if no WWN is found

Bug #1819577 reported by Avishay Traeger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
New
Undecided
Avishay Traeger

Bug Description

Due to the recently-added WWN validation, if get_sysfs_wwn() doesn't return a WWN for some reason, the verification fails:

VolumeDeviceValidationFailed: Volume device validation failed for device sda (expected 3624a93702f6eb7add2464f9b004a6826, found .

Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

It would have been great to share a bit of more of details related to the issue. My thinking is that your patch can't work in case of multipath usage since the devices are not registered anymore in sysfs. But it's just one potential issue, it may have others.

As you have noticed, reverting this commit 14be08d0b53836963a530e2990a6db73901cbdac may be a good start but if we can have share details we could also try to fix the change.

commit 14be08d0b53836963a530e2990a6db73901cbdac
Author: Avishay Traeger <email address hidden>
Date: Tue Jan 29 10:10:50 2019 +0200

    Verify WWN of connected iSCSI devices if passed

    If a WWN has been provided in connection_properties, verify that the
    found devices have that expected WWN. Fail the attachment if not. This
    prevents cases where a device already exists on the host from an old
    attachment that wasn't fully cleaned up, and the new attachment got
    the same LUN. Using this old device could lead to data corruption.

    Change-Id: I45a2221c0518213dc8132831c0bde9db4734da2b
    Closes-Bug: 1813609

 os_brick/exception.py | 5 +++++
 os_brick/initiator/connectors/iscsi.py | 3 +++
 os_brick/initiator/linuxscsi.py | 10 ++++++++++
 os_brick/tests/initiator/test_linuxscsi.py | 12 ++++++++++++
 releasenotes/notes/verify-iscsi-wwns-f6cb536a7fbd4b42.yaml | 9 +++++++++

Revision history for this message
Avishay Traeger (avishay-il) wrote :

Thanks Sahid. Right now the goal is to revert the patch since a new version of os-brick was just released and this is broken, and we need a low-risk fix (revert). After that we should definitely try to fix it.

Changed in os-brick:
assignee: nobody → Avishay Traeger (avishay-il)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to os-brick (master)

Reviewed: https://review.openstack.org/642648
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=6adbce5ef7f1af3d62a9ef145baa13730f16fb87
Submitter: Zuul
Branch: master

commit 6adbce5ef7f1af3d62a9ef145baa13730f16fb87
Author: Avishay Traeger <email address hidden>
Date: Tue Mar 12 07:37:00 2019 +0200

    Revert "Verify WWN of connected iSCSI devices if passed"

    This reverts commit 14be08d0b53836963a530e2990a6db73901cbdac.

    Change-Id: I1c99cdff5074180a09c315954c743b2bb0565f53
    Related-Bug: #1819577

Revision history for this message
Jay Bryant (jsbryant) wrote :

Avishay,

Any plan to follow up on this?

Thanks!
Jay

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.