Flavor Extra Specs should check Metadata Items Quota

Bug #1212195 reported by Rohit Karajgi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Medium
Unassigned

Bug Description

The flavor extra specs extension does not actually adhere to any quota restrictions during create.
The API handles the MetadataLimitExceeded exception
(see https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/flavorextraspecs.py#L76)
, but it looks like this exception would never get raised.

By default the Metadata Items quota for a tenant is 128. With the current code, more than 128 flavor extra spec items can be created.
Either of the two should be done:

1. Enforce the metadata limit (use _check_metadata_properties_quota() just as used in instance metadata) , Or,
2. If this limit should not be enforced, then the exception handling code should be removed.

Tags: api ntt
Rohit Karajgi (rohitk)
Changed in nova:
assignee: nobody → Rohit Karajgi (rohitkarajgi)
Revision history for this message
Joe Gordon (jogo) wrote :

git grep shows:
nova/compute/api.py: raise exception.MetadataLimitExceeded(allowed=...

So is this still valid?

Changed in nova:
status: New → Incomplete
Revision history for this message
Tushar Patil (tpatil) wrote :

Joe: The above metadata limit check is implemented for instances not for flavors. In the current code, I can add any number of metadata items to any flavor. I think this should be restricted to certain limit similar to instances.

Rohit Karajgi (rohitk)
Changed in nova:
assignee: Rohit Karajgi (rohitkarajgi) → nobody
status: Incomplete → New
Changed in nova:
assignee: nobody → Abhijeet Malawade (abhijeet-malawade)
Mathew Odden (locke105)
Changed in nova:
importance: Undecided → Medium
status: New → In Progress
tags: added: api
Changed in nova:
assignee: Abhijeet Malawade (abhijeet-malawade) → nobody
Tracy Jones (tjones-i)
Changed in nova:
status: In Progress → Triaged
Revision history for this message
Jon Grimm (jgrimm) wrote :

FWIW, the exception handling has been removed,

https://github.com/openstack/nova/commit/cdae1c4fec1ddfa7e5939e8e23ff916bf7c78dea

, whether quota adherence is desirable is a good question.

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

It's an admin api so I don't think we need to quota restrict it.

Changed in nova:
status: Triaged → Won't Fix
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.