[openstack-dev] [nova] Reducing quota below utilisation

Jan van Eldik Jan.van.Eldik at cern.ch
Tue Jun 17 19:53:42 UTC 2014


On 06/17/2014 08:18 PM, Tim Bell wrote:
> We have some projects which are dynamically creating VMs up to their
> quota. Under some circumstances, as cloud administrators, we would like
> these projects to shrink and make room for other higher priority work.
> We had investigated setting the project quota below the current
> utilisation (i.e. effectively delete only, no create). This will
> eventually match the desired level of VMs as the dynamic workload leads
> to old VMs being deleted and new ones cannot be created.
> However, OpenStack does not allow a quota to be set to below the current
> usage.

Just to add that "nova help quota-update" suggests that the "--force" 
option should do the trick:

   --force               Whether force update the quota even if the
                         already used and reserved exceeds the new quota

However, when trying to lower the quota below the current usage value,
we get:

  $ nova absolute-limits --te $ID|grep -i core
  | totalCoresUsed          | 11    |
  | maxTotalCores           | 20    |
  $ nova quota-update --cores 2 $ID
  ERROR: Quota value 2 for cores are greater than already used and 
reserved 11 (HTTP 400) (Request-ID: 
  $ nova quota-update --cores 2 --force $ID
  ERROR: Quota limit must greater than 11. (HTTP 400) (Request-ID: 

Am I misunderstanding what "--force" does?

BTW: I believe the first error message is wrong, and will propose
a patch.

        cheers, Jan

> This seems a little restrictive … any thoughts from others ?
> Tim
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

More information about the OpenStack-dev mailing list