<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">Le 09/01/2015 09:01, Alex Xu a écrit :<br>
</div>
<blockquote
cite="mid:CAH7mGas2rOY+CGpfSBQP-9J7Wt-JJLObUd9y7152vQw0rLQ6Pg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi, All
<div><br>
</div>
<div>There is bug when running nova with ironic <a
moz-do-not-send="true"
href="https://bugs.launchpad.net/nova/+bug/1402658">https://bugs.launchpad.net/nova/+bug/1402658</a></div>
<div><br>
</div>
<div>The case is simple: one baremetal node with 1024MB ram,
then boot two instances with 512MB ram flavor.</div>
<div>Those two instances will be scheduling to same baremetal
node.</div>
<div><br>
</div>
<div>The problem is at scheduler side the IronicHostManager will
consume all the resources for that node whatever</div>
<div>how much resource the instance used. But at compute node
side, the ResourceTracker won't consume resources</div>
<div>like that, just consume like normal virtual instance. And
ResourceTracker will update the resource usage once the</div>
<div>instance resource claimed, then scheduler will know there
are some free resource on that node, then will try to</div>
<div>schedule other new instance to that node.</div>
<div><br>
</div>
<div>I take look at that, there is NumInstanceFilter, it will
limit how many instance can schedule to one host. So can</div>
<div>we just use this filter to finish the goal? The max
instance is configured by option 'max_instances_per_host', we</div>
<div>can make the virt driver to report how many instances it
supported. The ironic driver can just report
max_instances_per_host=1.</div>
<div>And libvirt driver can report max_instance_per_host=-1,
that means no limit. And then we can just remove the</div>
<div>IronicHostManager, then make the scheduler side is more
simpler. Does make sense? or there are more trap?</div>
<div><br>
</div>
<div>Thanks in advance for any feedback and suggestion.</div>
<div><br>
</div>
</div>
</blockquote>
<br>
<br>
Mmm, I think I disagree with your proposal. Let me explain by the
best I can why :<br>
<br>
tl;dr: Any proposal unless claiming at the scheduler level tends to
be wrong<br>
<br>
The ResourceTracker should be only a module for providing stats
about compute nodes to the Scheduler.<br>
How the Scheduler is consuming these resources for making a decision
should only be a Scheduler thing.<br>
<br>
Here, the problem is that the decision making is also shared with
the ResourceTracker because of the claiming system managed by the
context manager when booting an instance. It means that we have 2
distinct decision makers for validating a resource.<br>
<br>
Let's stop to be realistic for a moment and discuss about what could
mean a decision for something else than a compute node. Ok, let say
a volume.<br>
Provided that *something* would report the volume statistics to the
Scheduler, that would be the Scheduler which would manage if a
volume manager could accept a volume request. There is no sense to
validate the decision of the Scheduler on the volume manager, just
maybe doing some error management.<br>
<br>
We know that the current model is kinda racy with Ironic because
there is a 2-stage validation (see [1]). I'm not in favor of
complexifying the model, but rather put all the claiming logic in
the scheduler, which is a longer path to win, but a safier one.<br>
<br>
-Sylvain<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/nova/+bug/1341420">https://bugs.launchpad.net/nova/+bug/1341420</a><br>
<br>
<blockquote
cite="mid:CAH7mGas2rOY+CGpfSBQP-9J7Wt-JJLObUd9y7152vQw0rLQ6Pg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thanks</div>
<div>Alex</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>