the deletion of the instance does not release the memory quota for vram

Bug #1681989 reported by 赵明俊
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
赵明俊
Ocata
Fix Committed
Medium
Lee Yarwood

Bug Description

When creating an instance, the quota is used to contain vram, and the deletion of the instance does not release the memory quota for vram

If a flavor defines 512MB of RAM and 64MB of video RAM, creating an instance will take up 576MB of memory quota, but after deleting the instance, it will only release 512MB of memory quotas.
In this way, after multiple creation and deletion of the virtual machine, it will gradually run out of the memory quota, but in fact did not run so many instances.

Tags: quotas
赵明俊 (falseuser)
Changed in nova:
assignee: nobody → 赵明俊 (falseuser)
赵明俊 (falseuser)
Changed in nova:
status: New → Confirmed
status: Confirmed → New
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/456050

Changed in nova:
status: Confirmed → In Progress
赵明俊 (falseuser)
tags: added: quotas
赵明俊 (falseuser)
Changed in nova:
status: In Progress → Confirmed
status: Confirmed → New
status: New → In Progress
Revision history for this message
赵明俊 (falseuser) wrote :

This bug still exists in the master branch

melanie witt (melwitt)
Changed in nova:
importance: Undecided → Medium
Changed in nova:
assignee: 赵明俊 (falseuser) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → 赵明俊 (falseuser)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/456050
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f2d03bf92db3615693b62f4f3274b867f00c0967
Submitter: Jenkins
Branch: master

commit f2d03bf92db3615693b62f4f3274b867f00c0967
Author: falseuser <email address hidden>
Date: Wed Apr 12 03:35:33 2017 +0000

    [BugFix] Release the memory quota for video ram when deleting an instance.

    When creating an instance, the quota is used to contain vram,
    and the deletion of the instance does not release the memory quota for vram,
    if delete intance it need to release the memory quota for vram.

    Change-Id: Iee2925c585c87d9885fd4bfe38cd9b4d316f5dab
    Closes-Bug: #1681989

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/463148

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0b2

This issue was fixed in the openstack/nova 16.0.0.0b2 development milestone.

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

Reviewed: https://review.openstack.org/463148
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=87989c5a37d0894e104ccfebeb05115d593291f4
Submitter: Jenkins
Branch: stable/ocata

commit 87989c5a37d0894e104ccfebeb05115d593291f4
Author: falseuser <email address hidden>
Date: Wed Apr 12 03:35:33 2017 +0000

    [BugFix] Release the memory quota for video ram when deleting an instance.

    When creating an instance, the quota is used to contain vram,
    and the deletion of the instance does not release the memory quota for vram,
    if delete intance it need to release the memory quota for vram.

    Change-Id: Iee2925c585c87d9885fd4bfe38cd9b4d316f5dab
    Closes-Bug: #1681989
    (cherry picked from commit f2d03bf92db3615693b62f4f3274b867f00c0967)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.6

This issue was fixed in the openstack/nova 15.0.6 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/483133

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

Reviewed: https://review.openstack.org/483133
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f9eea8869eabf12d3e1a078bd48fa96f0badb1ed
Submitter: Jenkins
Branch: master

commit f9eea8869eabf12d3e1a078bd48fa96f0badb1ed
Author: Matt Riedemann <email address hidden>
Date: Wed Jul 12 19:44:34 2017 -0400

    Stop counting hw_video:ram_max_mb against quota

    The hw_video:ram_max_mb flavor extra spec is only used by the
    libvirt driver and was added back in Icehouse as part
    of blueprint libvirt-video-driver-selection.

    For whatever reason, it was used to count against a project's
    ram quota when an instance was created but failed to be
    accounted for during an instance delete, at least until that
    bug was fixed over 3 years later in Pike with commit f2d03bf92.

    This is the only flavor extra spec that is counted against
    quota in the API and is only used by a single virt driver.
    If something like this is going to actually be counted, it
    should probably be as part of the overhead calculation that
    happens in the compute service as part of the resource claim
    on the host.

    Also note that this is not counted as part of the MEMORY_MB
    allocation record for the instance with the Placement service,
    which means it's not accounted for when scheduling and selecting
    a destination host.

    With blueprint cells-count-resources-to-check-quota-in-api changing
    how we count quota usage from the API, this special snowflake will
    also cause problems as it's not tracked in the instances table
    record like vcpus and memory_mb are tracked, so we'd have to slow
    down the DB queries by doing extra joins for flavor extra specs
    to account for this extra overhead that is probably rarely used
    in most deployments, which is even more apparent given the
    usage decrement issue wasn't fixed until over 3 years after the
    feature was added.

    Therefore this change removes the counting of the hw_video:ram_max_mb
    flavor extra spec value against the project quota in the API.

    Related-Bug: #1681989
    Related-Bug: #1704012

    Related to blueprint cells-count-resources-to-check-quota-in-api

    Change-Id: Iad631f0f775df6263ea730cadca5b089ce859b9b

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.