Comment 3 for bug 1937375

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/801990
Committed: https://opendev.org/openstack/nova/commit/2209b0007fe85d7c5439e0bfdfe2120c63898fa2
Submitter: "Zuul (22348)"
Branch: master

commit 2209b0007fe85d7c5439e0bfdfe2120c63898fa2
Author: Felix Huettner <email address hidden>
Date: Fri Jul 23 10:43:32 2021 +0200

    compute: Avoid duplicate BDMs during reserve_block_device_name

    When attaching a volume to a running instance the nova-api validates
    that the volume is not already attached to the instance. However
    nova-compute is responsible for actually creating the BDM entry in the
    database. If sending attach requests fast enough it can be possible
    that the same "attach_volume" request can be sent to nova-compute for
    the same volume/instance combination.

    To work around this we add a check in nova-compute to validate that
    the volume has not been attached in the mean time.

    Closes-Bug: #1937375
    Change-Id: I92f35514efddcb071c7094370b79d91d34c5bc72