Comment 7 for bug 1757190

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

Reviewed: https://review.openstack.org/555029
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8706dc3f4fe44622d459b020b1c5adef392faa0c
Submitter: Zuul
Branch: stable/queens

commit 8706dc3f4fe44622d459b020b1c5adef392faa0c
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 20 15:04:27 2018 -0400

    Preserve multiattach flag when refreshing connection_info

    When we attach a multiattach-capable volume, we do something
    dirty and stash a "multiattach" boolean flag in the
    BlockDeviceMapping.connection_info dict. This is used by the
    virt driver to determine how to connect the volume (for the
    libvirt driver, it sets the "shareable" element on the disk
    config xml).

    When resizing an instance, ComputeManager._finish_resize on
    the destination host refreshes the block device mapping list
    along with the connection_info for each BDM. Because of this,
    it would overwrite the BDM.connection_info along with the stashed
    "multiattach" flag which is later used to connect the volumes
    on the destination host via the virt driver.finish_migration
    method. This leads to failures with multiattach volumes because
    the disk config is wrong.

    To fix this, when refreshing BDM connection_info, we preserve
    the multiattach flag in the connection_info, similar to the
    serial (volume ID) and multipath_id.

    Interestingly enough, the nova-multiattach job does not fail
    the volume multiattach resize test with libvirt 1.3.1 and qemu
    2.5. This failure was only noticed once the nova-multiattach
    job was tested with libvirt 4.0.0 and qemu 2.11.1. So maybe there
    was something in the older package versions that masked this
    obvious bug in the nova code.

    Change-Id: Iaee13478212cc04e6d1a1249f33822369d94d41d
    Closes-Bug: #1757190
    (cherry picked from commit 5f3cca205581d45d92714ce1a909d4394b7812ff)