Unshelve can cause quota over-consumption

Bug #2054797 reported by Lars Erik Pedersen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Description
===========
Unshelving a VM can cause an over consumption of a project's quota. I'm not sure if this is a bug or if it's actually intended behaviour, but in my opinion this should not be possible since this will allow users to potentially use a lot more resources than their intended quota.

Steps to reproduce
==================
* Create a project with a quota of i.e. 4 CPUs and 4GB of RAM
* Create server1 with 2 CPUs and 2GB RAM, and shelve it after it successfully spawns
* When server1 in shelved, create server2 with 4 CPUs and 4GB of RAM (effectively using up the entire CPU and RAM quota of the project)
* Unshelve server1

Expected result
===============
I would then expect that unshelving server1 would fail, since the quota was used up by server2

Actual result
=============
Unshelving server1 is completed, and I have now used 6 of 4 CPUs and 6 of 4GB RAM on my project's quota. FWIW this also works if at the time of unshelving the quota is already used up.

Environment
===========
Openstack Yoga
nova-api 3:25.1.1-0ubuntu1~cloud0
nova-scheduler 3:25.1.1-0ubuntu1~cloud0

Running KVM/libvirt on Ubuntu 20.04 and Ceph 17.x

Revision history for this message
sean mooney (sean-k-mooney) wrote :

this sound like you have count_usage_from_placement=true

https://docs.openstack.org/nova/latest/configuration/config.html#quota.count_usage_from_placement

in which case this is not a bug and is the intended behavior

thee was a bug related to this which i belvie was fixed recently
it may or may not be backproted to yoga

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.