[openstack-dev] [compute][nova] Provide an option to ignore suspended VMs in the resource count
Arthur Lutz
arthur.lutz at logilab.fr
Thu Oct 9 12:51:12 UTC 2014
Hi list,
Here is proposal previously posted on
https://bugs.launchpad.net/nova/+bug/1378233
It would be very useful for our case scenario to be able to have an
option that enables not counting suspended machines as consuming
resources. The use case is having little memory available and still
being able to launch new VMs when old VMs are in suspended mode. We
understand that once the compute node's memory is full we won't be able
to resume these machines, but that is OK with the way we're using our cloud.
For example a compute node with 8G of RAM, launch 1 VM with 4G and
another with 2G, then suspend them both, one could then launch a new VM
with 4G of RAM (the actual memory on the compute node is free).
On essex we had the following patch for this scenario to work :
Index: nova/nova/scheduler/host_manager.py
===================================================================
--- nova.orig/nova/scheduler/host_manager.py
+++ nova/nova/scheduler/host_manager.py
@@ -337,6 +337,8 @@ class HostManager(object):
if not host:
continue
host_state = host_state_map.get(host, None)
+ if instance.get('power_state', 1) != 1: # power_state.RUNNING
+ continue
if not host_state:
continue
host_state.consume_from_instance(instance)
We're looking into patching icehouse for the same behaviour but would
like to add it as an option this time.
If you have any comments on this before I write up a blueprint and nova
spec, they would be welcome.
Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141009/7295ce12/attachment.html>
More information about the OpenStack-dev
mailing list