<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>While discussing the proposal to add resource_class’ to Ironic nodes for interacting with the resource provider system in Nova with Jim on IRC, I voiced my concern about having a resource_class per node. My thoughts were that we could achieve the behaviour
we require by every Ironic node resource provider having a "baremetal" resource class of which they can own a maximum of 1. Flavor’s that are required to land on a baremetal node would then define that they require at least 1 baremetal resource, along with
any other resources they require. For example:</div>
<div><br>
</div>
<div>Resource Provider 1 Resources:</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Baremetal: 1</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>RAM: 256</div>
<div> CPUs: 4</div>
<div><br>
</div>
<div>
<div>Resource Provider 2 Resources:</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>Baremetal: 1</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>RAM: 512</div>
<div> CPUs: 4</div>
</div>
<div><br>
</div>
<div>
<div>Resource Provider 3 Resources:</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>Baremetal: 0</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>RAM: 0</div>
<div> CPUs: 0</div>
</div>
<div><br>
</div>
<div>(Resource Provider 3 has been used, so it has zero resources left)</div>
<div><br>
</div>
<div> Given the thought experiment it seems like this would work great with one exception, if you define 2 flavors: </div>
<div><br>
</div>
<div>Flavor 1 Required Resources:</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Baremetal: 1</div>
<div> RAM: 256</div>
<div><br>
</div>
<div>Flavor 2 Required Resources:</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>Baremetal: 1</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>RAM: 512</div>
<div><br>
</div>
<div>Flavor 2 will only schedule onto Resource Provider 2 because it is the only resource provider that can provide the amount of resources required. However Flavor 1 could potentially end up landing on Resource Provider 2 even though it provides more RAM than
is actually required. The Baremetal resource class would prevent a second node from ever being scheduled onto that resource provider, so scheduling more nodes doesn’t result on 2 instance on the same node, but it is an inefficient use of resources.</div>
<div><br>
</div>
<div>To combat this inefficient use of resources, I wondered if it was possible to add a flag to a resource provider to define that it is an indivisible resource provider, which would prevent flavors that don’t use up all the resources a provider provides from
landing on that provider.</div>
<div><br>
</div>
<div>Sam</div>
<div><br>
</div>
<div> </div>
</body>
</html>