Comment 6 for bug 1661016

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

Reviewed: https://review.openstack.org/431540
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a714ffe89f1201c2b238284be3a4817b497b161b
Submitter: Jenkins
Branch: stable/newton

commit a714ffe89f1201c2b238284be3a4817b497b161b
Author: Lee Yarwood <email address hidden>
Date: Tue Jan 31 18:39:15 2017 +0000

    libvirt: Remove redundant bdm serial mangling and saving during swap_volume

    During an initial swap_volume call the serial of the original volume was
    previously stashed in the connection_info of the new volume by the
    compute layer. This was used by I19d5182d11 to allow the virt driver to
    lookup and update the existing BDM with the new volume's connection_info
    after it had been used by connect_volume.

    Future calls to swap_volume in the compute layer would not
    update the serial found in the old volume connection_info. This would
    result in an invalid serial being copied into the new volume
    connection_info and used to preform a lookup of a BDM that didn't exist.

    To correct this we now explicitly set the serial of the new volume to
    that of the new volume id. While the correct serial id should already be
    present in the connection_info provided by most backend Cinder volume
    drivers the act of updating this dict is required by our own functional
    tests to invoke a failure case :

    https://git.io/vDmRE

    The serial is updated once more to match the volume id returned
    by os-migrate-volume-completion prior to the BDM being updated in the
    compute layer.

    The BDM lookup and save from the virt layer is also removed as the
    compute layer retains a reference to new_cinfo and will update the BDM
    with this, including any modifications, at the end of swap_volume.

    Finally, the associated Tempest admin test is also extended by the
    following change to now attempt a second volume swap to verify these
    changes :

    I2a2c80a164b9f75d0e7e0503a24194bedfc0e66b

    Conflicts:
            nova/compute/manager.py

    NOTE(lyarwood): Simple conflict caused by I90d4ffcb adding an error
    notification for swap_volume.

    Closes-bug: #1661016
    Change-Id: If74dd9d8e7191047b6f1cd7e35b6fc667f004f91
    (cherry picked from commit 1bf7ac804808eb0d4a68847e466f5fa7d1dcd55e)
    (cherry picked from commit 4bf211c617814d46d590bb7b11806170f5c19484)