quotas for nonexistent projects

Bug #815857 reported by Alexej Ababilov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Low
Unassigned

Bug Description

Project quotas in nova could be stored and retrieved even if the project doesn't exist. Indeed, nova database has no restrictions, and the quotas' table could store quotas for projects with arbitrary names even if there are no such projects in the projects' table.

For example, let us see quotas for nonexistent "fgh" project, set "cores" quota, verify that it is stored, and check that there is still no "fgh" project.

# nova-manage project quota fgh
metadata_items: 128
instances: 10
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 20
ram: 51200
floating_ips: 10

# nova-manage project quota fgh cores 16
metadata_items: 128
instances: 10
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 16
ram: 51200
floating_ips: 10

# nova-manage project quota fgh
metadata_items: 128
instances: 10
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 16
ram: 51200
floating_ips: 10

# nova-manage project list
1234
aproject

Revision history for this message
Craig Vyvial (cp16net) wrote : Re: [Bug 815857] [NEW] quotas for nonexistent projects

Currently these quotas are determined by the default flags regardless of the
project name and if there are quotas for the project then the defaults are
overwritten and returned.

-Craig Vyvial

On Mon, Jul 25, 2011 at 7:35 AM, Alessio Ababilov <
<email address hidden>> wrote:

> Public bug reported:
>
> Project quotas in nova could be stored and retrieved even if the project
> doesn't exist. Indeed, nova database has no restrictions, and the
> quotas' table could store quotas for projects with arbitrary names even
> if there are no such projects in the projects' table.
>
> For example, let us see quotas for nonexistent "fgh" project, set
> "cores" quota, verify that it is stored, and check that there is still
> no "fgh" project.
>
> # nova-manage project quota fgh
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 20
> ram: 51200
> floating_ips: 10
>
> # nova-manage project quota fgh cores 16
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 16
> ram: 51200
> floating_ips: 10
>
> # nova-manage project quota fgh
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 16
> ram: 51200
> floating_ips: 10
>
> # nova-manage project list
> 1234
> aproject
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/815857
>
> Title:
> quotas for nonexistent projects
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Project quotas in nova could be stored and retrieved even if the
> project doesn't exist. Indeed, nova database has no restrictions, and
> the quotas' table could store quotas for projects with arbitrary names
> even if there are no such projects in the projects' table.
>
> For example, let us see quotas for nonexistent "fgh" project, set
> "cores" quota, verify that it is stored, and check that there is still
> no "fgh" project.
>
> # nova-manage project quota fgh
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 20
> ram: 51200
> floating_ips: 10
>
> # nova-manage project quota fgh cores 16
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 16
> ram: 51200
> floating_ips: 10
>
> # nova-manage project quota fgh
> metadata_items: 128
> instances: 10
> injected_file_content_bytes: 10240
> injected_files: 5
> volumes: 10
> gigabytes: 1000
> cores: 16
> ram: 51200
> floating_ips: 10
>
> # nova-manage project list
> 1234
> aproject
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/815857/+subscriptions
>

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

From Vish:
I'm not sure if there is a fixable bug at this point. Projects are moving into keystone, so there won't be any useful way for nova to verify whether a project exists before creating a quota for it. As long as we are maintaining quotas in nova, this will be the case. It may be that quotas eventually move into keystone as well, at which point some more robust verification could be done.

Changed in nova:
status: Confirmed → 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.