Why doesn't Openstack free resources when instance is shelved

asked 2015-04-27 11:53:40 -0600

DaveJ gravatar image


If I have a tenant that is allowed 100 vCPUs but only 4GB of RAM.

If I create an instance that runs on shared storage (using ceph on a remote server), using 2 vCPU but all 4GB RAM, I cannot create any more instances, as my quota is reached.

image description

image description

This is expected.

However if I shutdown the instance my quota is still exceeded, even though technically the VM is not using any resources.

image description

If I now shelve the Instance, I also see no change.

The only way I can release the resources, but retain the data is by snapshotting and deleting the instance. The problem with snapshotting is that I don't retain any of the VM properties such as the assigned IP address.

Is this a bug, or intentional. Is there any way to avoid deleting instances to free up resources?

edit retag flag offensive close merge delete


Is it reflected by SQL query :-

MariaDB [nova]> select created_at, deleted_at, display_name, hostname from instances ;
dbaxps gravatar imagedbaxps ( 2015-04-27 12:17:13 -0600 )edit

If yes , I believe database content should reread by system services

dbaxps gravatar imagedbaxps ( 2015-04-27 12:18:28 -0600 )edit

Hi dbapxs, Yes The query shows this: | 2015-04-27 16:04:05 | NULL | TestInstance | testinstance |

DaveJ gravatar imageDaveJ ( 2015-04-27 14:07:23 -0600 )edit

I would restart Controller.

dbaxps gravatar imagedbaxps ( 2015-04-27 14:11:26 -0600 )edit

Manually update deleted_at field to '2015-04-27 17:04:05' ; commit ; exit
Restart all services on Controller.

dbaxps gravatar imagedbaxps ( 2015-04-27 14:14:11 -0600 )edit