hw_video:ram_max_mb is tracked for quota but not compute node resource provider allocations

Bug #1704012 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

This came up in discussion here:

https://review.openstack.org/#/c/416521/58/nova/compute/api.py@1904

There is a flavor extra spec called "hw_video:ram_max_mb" which is used in the compute API code to count against a project's ram usage in addition to the memory_mb in the flavor being used to create the instance.

The hw_video:ram_max_mb flavor extra spec is only then used in the libvirt driver, but not anywhere else.

The issue is that when doing claims in the resource tracker and reporting allocations for the compute node resource provider to the placement service, we don't account for the hw_video:ram_max_mb value in addition to the flavor.memory_mb value, so we're really taking up more MEMORY_MB inventory capacity on the compute node than what's reported to Placement, which is a problem, probably. :)

This is a latent bug since that flavor extra spec was introduced.

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

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
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.

Other bug subscribers

Remote bug watches

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