<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="word-wrap:break-word">
<div>The hardware.py scheduler that was posted earlier had a bug that makes it not do what it claims to do. I have attached my fix for anyone that is interested. </div>
<div><br>
</div>
<div>The original code assumes that all the hosts are full when it finds one full host. It should check them all. The simple scheduler can make this assumption because the db.service_get_all_compute_sorted(context) call returns a list that is sorted (in
ascending order) by number of virtual cores each host is currently handling. Since the simple scheduler assumes that all hosts have the same number of cores, when it finds a full host it knows that the hosts remaining the the sorted list are also full.</div>
<div><br>
</div>
<div>Paul</div>
<div><br>
</div>
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
<div><br>
</div>
<br>
<div>
<div>On Jan 18, 2012, at 1:29 PM, Michael J Fork wrote:</div>
<br class="x_Apple-interchange-newline">
<blockquote type="cite"><font size="2" face="sans-serif">I was able to get it to work by downloading the hardware.py file to site-packages/nova/scheduler/hardware.py and setting the scheduler_driver in nova.conf</font>
<br>
<br>
<font size="2" face="sans-serif">--scheduler_driver=nova.scheduler.hardware.HardwareScheduler</font>
<br>
<font size="2" face="sans-serif"><br>
Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Cloud Architect, Emerging Solutions<br>
IBM Systems & Technology Group</font> <br>
<br>
<br>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">From: </font><font size="1" face="sans-serif"><<a href="mailto:J.O'Loughlin@surrey.ac.uk">J.O'Loughlin@surrey.ac.uk</a>></font>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">To: </font><font size="1" face="sans-serif"><<a href="mailto:diego.parrilla.santamaria@gmail.com">diego.parrilla.santamaria@gmail.com</a>></font>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">Cc: </font><font size="1" face="sans-serif"><a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a></font>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">Date: </font><font size="1" face="sans-serif">01/18/2012 12:28 PM</font>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">Subject: </font><font size="1" face="sans-serif">Re: [Openstack-operators] set max number of instances per compute node</font>
<br>
<font size="1" color="#5f5f5f" face="sans-serif">Sent by: </font><font size="1" face="sans-serif"><a href="mailto:openstack-operators-bounces@lists.openstack.org">openstack-operators-bounces@lists.openstack.org</a></font>
<br>
<hr noshade="">
<br>
<br>
<br>
<tt><font size="2"><br>
Thanks,<br>
<br>
What options would I need to set in nova.conf to change the scheduler to this?<br>
<br>
Regards<br>
<br>
John O'Loughlin<br>
FEPS IT, Service Delivery Team Leader<br>
________________________________________<br>
From: Diego Parrilla SantamarĂa [diego.parrilla.santamaria@gmail.com]<br>
Sent: 18 January 2012 16:50<br>
To: O'Loughlin JF Mr (FEPS Faculty Admin)<br>
Cc: <a href="mailto:fifieldt@unimelb.edu.au">fifieldt@unimelb.edu.au</a>; <a href="mailto:openstack-operators@lists.openstack.org">
openstack-operators@lists.openstack.org</a><br>
Subject: Re: [Openstack-operators] set max number of instances per compute node<br>
<br>
Everett Toews wrote something really sexy a couple of months ago:<br>
<br>
</font></tt><a href="https://github.com/canarie/dair/blob/master/OpenStack/misc/hardware.py"><tt><font size="2">https://github.com/canarie/dair/blob/master/OpenStack/misc/hardware.py</font></tt></a><tt><font size="2"><br>
<br>
May be you can give it good use!<br>
<br>
--<br>
Diego Parrilla<br>
<</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">>CEO<br>
</font></tt><a href=""><tt><font size="2">www.stackops.com</font></tt></a><tt><font size="2"><</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">> | diego.parrilla@stackops.com<</font></tt><a href="mailto:diego.parrilla@stackops.com"><tt><font size="2">mailto:diego.parrilla@stackops.com</font></tt></a><tt><font size="2">>
| +34 649 94 43 29 | <a href="">skype:diegoparrilla</a><br>
<</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">><br>
<br>
<br>
<br>
<br>
<br>
On Wed, Jan 18, 2012 at 5:33 PM, <J.O'Loughlin@surrey.ac.uk<</font></tt><a href="mailto:J.O%27Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%27Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2">>> wrote:<br>
<br>
Are there any docs on configuring the various schedulers? I'm putting together a test cloud, and have a variety of different servers.<br>
<br>
Regards<br>
<br>
John O'Loughlin<br>
FEPS IT, Service Delivery Team Leader<br>
________________________________________<br>
From: Diego Parrilla SantamarĂa [diego.parrilla.santamaria@gmail.com<</font></tt><a href="mailto:diego.parrilla.santamaria@gmail.com"><tt><font size="2">mailto:diego.parrilla.santamaria@gmail.com</font></tt></a><tt><font size="2">>]<br>
Sent: 18 January 2012 16:28<br>
To: O'Loughlin JF Mr (FEPS Faculty Admin)<br>
Cc: fifieldt@unimelb.edu.au<</font></tt><a href="mailto:fifieldt@unimelb.edu.au"><tt><font size="2">mailto:fifieldt@unimelb.edu.au</font></tt></a><tt><font size="2">>; openstack-operators@lists.openstack.org<</font></tt><a href="mailto:openstack-operators@lists.openstack.org"><tt><font size="2">mailto:openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">><br>
Subject: Re: [Openstack-operators] set max number of instances per compute node<br>
<br>
Correct me if I'm wrong, but this parameter is used by the SimpleScheduler, so it must be in the configuration file used by nova-scheduler.<br>
<br>
Cheers<br>
Diego<br>
<br>
--<br>
Diego Parrilla<br>
<</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">>CEO<br>
</font></tt><a href=""><tt><font size="2">www.stackops.com</font></tt></a><tt><font size="2"><</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com</font></tt></a><tt><font size="2">><</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">>
| diego.parrilla@stackops.com<</font></tt><a href="mailto:diego.parrilla@stackops.com"><tt><font size="2">mailto:diego.parrilla@stackops.com</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:diego.parrilla@stackops.com"><tt><font size="2">mailto:diego.parrilla@stackops.com</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:diego.parrilla@stackops.com"><tt><font size="2">mailto:diego.parrilla@stackops.com</font></tt></a><tt><font size="2">>>
| +34 649 94 43 29<tel:%2B34%20649%2094%2043%2029> | <a href="">skype:diegoparrilla</a><br>
<</font></tt><a href="http://www.stackops.com/"><tt><font size="2">http://www.stackops.com/</font></tt></a><tt><font size="2">><br>
<br>
[</font></tt><a href="http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png"><tt><font size="2">http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png</font></tt></a><tt><font size="2">]<br>
<br>
<br>
<br>
<br>
On Wed, Jan 18, 2012 at 4:57 PM, <J.O'Loughlin@surrey.ac.uk<</font></tt><a href="mailto:J.O%27Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%27Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:J.O%27Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%27Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:J.O%2527Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%2527Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2">>>>
wrote:<br>
<br>
Thanks,<br>
<br>
I added this as an option to nova.conf on one of my compute nodes and doesn't work. Does it need to be set on the scheduler host? if so, is it possible to set different values for different compute hosts?<br>
<br>
Regards<br>
<br>
John O'Loughlin<br>
FEPS IT, Service Delivery Team Leader<br>
________________________________________<br>
From: openstack-operators-bounces@lists.openstack.org<</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2">>>
[openstack-operators-bounces@lists.openstack.org<</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:openstack-operators-bounces@lists.openstack.org"><tt><font size="2">mailto:openstack-operators-bounces@lists.openstack.org</font></tt></a><tt><font size="2">>>]
On Behalf Of Tom Fifield [fifieldt@unimelb.edu.au<</font></tt><a href="mailto:fifieldt@unimelb.edu.au"><tt><font size="2">mailto:fifieldt@unimelb.edu.au</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:fifieldt@unimelb.edu.au"><tt><font size="2">mailto:fifieldt@unimelb.edu.au</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:fifieldt@unimelb.edu.au"><tt><font size="2">mailto:fifieldt@unimelb.edu.au</font></tt></a><tt><font size="2">>>]<br>
Sent: 18 January 2012 12:53<br>
To: openstack-operators@lists.openstack.org<</font></tt><a href="mailto:openstack-operators@lists.openstack.org"><tt><font size="2">mailto:openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:openstack-operators@lists.openstack.org"><tt><font size="2">mailto:openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:openstack-operators@lists.openstack.org"><tt><font size="2">mailto:openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">>><br>
Subject: Re: [Openstack-operators] set max number of instances per compute node<br>
<br>
</font></tt><a href="http://docs.openstack.org/diablo/openstack-compute/admin/content/reference-for-flags-in-nova-conf.html"><tt><font size="2">http://docs.openstack.org/diablo/openstack-compute/admin/content/reference-for-flags-in-nova-conf.html</font></tt></a><tt><font size="2"><br>
<br>
--max_cores default: '16' Integer value; Maximum number of instance<br>
cores to allow per compute host.<br>
<br>
Regards,<br>
<br>
Tom<br>
<br>
On 18/01/12 23:05, J.O'Loughlin@surrey.ac.uk<</font></tt><a href="mailto:J.O%27Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%27Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:J.O%27Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%27Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:J.O%2527Loughlin@surrey.ac.uk"><tt><font size="2">mailto:J.O%2527Loughlin@surrey.ac.uk</font></tt></a><tt><font size="2">>>
wrote:<br>
><br>
> All,<br>
><br>
> is there a way to set the maximum number of instances or cores that can be used on a compute node? (similar to the max_cores option in eucalyptus)<br>
><br>
> I'm running diablo.<br>
><br>
> Regards<br>
><br>
> John O'Loughlin<br>
> FEPS IT, Service Delivery Team Leader<br>
> _______________________________________________<br>
> Openstack-operators mailing list<br>
> Openstack-operators@lists.openstack.org<</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">>><br>
> </font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators"><tt><font size="2">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</font></tt></a><tt><font size="2"><br>
><br>
<br>
_______________________________________________<br>
Openstack-operators mailing list<br>
Openstack-operators@lists.openstack.org<</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">>><br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators"><tt><font size="2">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</font></tt></a><tt><font size="2"><br>
_______________________________________________<br>
Openstack-operators mailing list<br>
Openstack-operators@lists.openstack.org<</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2"><</font></tt><a href="mailto:Openstack-operators@lists.openstack.org"><tt><font size="2">mailto:Openstack-operators@lists.openstack.org</font></tt></a><tt><font size="2">>><br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators"><tt><font size="2">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</font></tt></a><tt><font size="2"><br>
<br>
<br>
_______________________________________________<br>
Openstack-operators mailing list<br>
<a href="mailto:Openstack-operators@lists.openstack.org">Openstack-operators@lists.openstack.org</a><br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators"><tt><font size="2">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</font></tt></a><tt><font size="2"><br>
<br>
</font></tt><br>
_______________________________________________<br>
Openstack-operators mailing list<br>
<a href="mailto:Openstack-operators@lists.openstack.org">Openstack-operators@lists.openstack.org</a><br>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators<br>
</blockquote>
</div>
<br>
</div>
</body>
</html>