Comment 2 for bug 1922920

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/786383
Committed: https://opendev.org/openstack/cinder/commit/28d9bca7d612ba263dce116525064842c99186fa
Submitter: "Zuul (22348)"
Branch: master

commit 28d9bca7d612ba263dce116525064842c99186fa
Author: Gorka Eguileor <email address hidden>
Date: Wed Apr 7 11:51:30 2021 +0200

    Fix notifications of migration temp volume

    Volume usage notifications in Cinder during Cinder volume migrations are
    incorrect.

    Part of a volume migration is creating a new volume on the destination
    backend and during this process Cinder will issue volume usage
    notifications "create.start" and "create.end" even though this is not a
    user volume creation and is inconsistent with other temporary volume and
    snapshot creation cases.

    Also one of the latest steps during the volume creation is to delete one
    of the 2 volumes (the source or the destination) and in that case Cinder
    will only issue a "delete.end" notification without its corresponding
    "delete.start".

    Since temporary volumes (for backups or migrations) are not counted
    towards quota usage they should also not issue volume usage
    notifications.

    This patch makes sure that we don't do notifications when creating or
    deleting temporary migration volumes.

    In both cases it checks the migration_status field to see if it starts
    with 'target:'. For creation the migration_status is set in
    _migrate_volume_generic method before making the RPC call, so the data
    will be there from the start, before the manager flow starts.

    Closes-Bug: #1922920
    Change-Id: I7164d700ef56a29e5d4f707fd2340e621bd6f351