shelve offload does not reduce core and RAM quota
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Currently, when an instance is shelved and offloaded, the usage quota for RAM and cores does not reduced although the resources themselves are no longer used on the hypervisor.
The IP should continue to be accounted for as it is reserved.
This fix is needed as we are looking to encourage our users to shelve less used instances when they get near their quota limits rather than asking for a quota increase.
1) create a VM:
openstack server create --image 7239c5e1-
2) check quota usage:
nova absolute-limits
+------
| Name | Used | Max |
+------
| Cores | 1 | 20 |
| ImageMeta | - | 128 |
| Instances | 1 | 10 |
| Keypairs | - | 100 |
| Personality | - | 5 |
| Personality Size | - | 10240 |
| RAM | 512 | 51200 |
| Server Meta | - | 128 |
| ServerGroupMembers | - | 10 |
| ServerGroups | 0 | 10 |
+------
3) shelve the instance and wait for it to offload
openstack shelve test-001
4) check quota usage:
nova absolute-limits
+------
| Name | Used | Max |
+------
| Cores | 1 | 20 |
| ImageMeta | - | 128 |
| Instances | 1 | 10 |
| Keypairs | - | 100 |
| Personality | - | 5 |
| Personality Size | - | 10240 |
| RAM | 512 | 51200 |
| Server Meta | - | 128 |
| ServerGroupMembers | - | 10 |
| ServerGroups | 0 | 10 |
+------
Good point, we should only count those resources once they're unshelved, I guess.
The real question is tho, should we encourage overprovisioning of resources using the shelve API ? Like you said, we're still allocating one IP address for that, and possibly some clouds couldn't like to have their pools exhausted by people overcommitting and not recycling their VMs.
I guess it's an open question, and TBH I don't think shelve is very cloud-compatible.