Comment 14 for bug 1731986

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

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

commit c65dfeecaec23c0fa1cefd5f72c56faa7589216b
Author: Matt Riedemann <email address hidden>
Date: Wed Nov 15 12:45:08 2017 -0500

    Check quota before creating volume snapshots

    When creating a snapshot of a volume-backed instance, we
    create a snapshot of every volume BDM associated with the
    instance. The default volume snapshot limit is 10, so if
    you have a volume-backed instance with several volumes attached
    and snapshot it a few times, you're likely to fail the
    volume snapshot at some point with an OverLimit error from
    Cinder. This can lead to orphaned volume snapshots in Cinder
    that the user then has to cleanup.

    This change makes the snapshot operation a bit more robust by
    first checking the quota limit and current usage for the given
    project before attempting to create any volume snapshots.

    It's not fail-safe since we could still fail with racing snapshot
    requests for the same project, but it's a simple improvement to
    avoid this issue in the general case.

    Change-Id: I4e7b46deb43c0c2430b480f1a498a52fc4a9daf0
    Related-Bug: #1731986
    (cherry picked from commit 289d2703c75123216d0a6802f2fe5f41aa84407c)