Comment 9 for bug 1775418

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.opendev.org/662340
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=58a140487c8127da727fa7e4fb56892f8c162536
Submitter: Zuul
Branch: stable/queens

commit 58a140487c8127da727fa7e4fb56892f8c162536
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 6 10:32:37 2018 -0400

    Block swap volume on volumes with >1 rw attachment

    If we're swapping from a multiattach volume that has more than one
    read/write attachment, another server on the secondary attachment could
    be writing to the volume which is not getting copied into the volume to
    which we're swapping, so we could have data loss during the swap.

    This change does volume read/write attachment counting for the volume
    we're swapping from and if there is more than one read/write attachment
    on the volume, the swap volume operation fails with a 400 BadRequest
    error.

    Conflicts:
          api-ref/source/os-volume-attachments.inc

    NOTE(mriedem): The conflict is due to not having change
    I5fc4d0ba3bb1c49dfaba2b2eed056441509cb9da in Queens. Also, the
    uuidsentinel has to be imported in the test_volumes module because
    change I9acc2e4d6c57ea0f45ba161116993d9f1a0e1e9f is not in Queens.

    Depends-On: https://review.openstack.org/573025/
    Closes-Bug: #1775418
    Change-Id: Icd7fcb87a09c35a13e4e14235feb30a289d22778
    (cherry picked from commit 5a1d159d142997bb4288d4bf86d4e144334905cd)
    (cherry picked from commit 9b21d1067a071ab17758068dfca5cd2ebd29d868)
    (cherry picked from commit c19d602f9be536ee8412bac0f0951a995424f25e)