<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div id="yui_3_10_3_1_1412857769928_1115"
class="yui3-editable_text-text">
<p>Hi list, <br>
</p>
<p>Here is proposal previously posted on
<a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/nova/+bug/1378233">https://bugs.launchpad.net/nova/+bug/1378233</a><br>
</p>
<p>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.</p>
<p>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).</p>
<p>On essex we had the following patch for this scenario to work :</p>
<p>Index: nova/nova/<wbr>scheduler/<wbr>host_manager.<wbr>py<br>
=======<wbr>=======<wbr>=======<wbr>=======<wbr>=======<wbr>=======<wbr>=======<wbr>=======<wbr>=======<wbr>====<br>
--- nova.orig/<wbr>nova/scheduler/<wbr>host_manager.<wbr>py<br>
+++ nova/nova/<wbr>scheduler/<wbr>host_manager.<wbr>py<br>
@@ -337,6 +337,8 @@ class HostManager(<wbr>object)<wbr>:<br>
if not host:<br>
<wbr> <wbr> continue<br>
<wbr> host_<wbr>state = host_state_<wbr>map.get(<wbr>host,
None)<br>
+ if instance.<wbr>get('power_<wbr>state', 1) != 1: #
power_state.RUNNING<br>
+ continue<br>
if not host_state:<br>
<wbr> <wbr> continue<br>
<wbr> host_<wbr>state.consume_<wbr>from_instance(<wbr>instance)</p>
<p>We're looking into patching icehouse for the same behaviour but
would like to add it as an option this time.<br>
</p>
<p>If you have any comments on this before I write up a blueprint
and nova spec, they would be welcome. <br>
</p>
<p>Arthur<br>
</p>
</div>
</body>
</html>