[Openstack-operators] set max number of instances per compute node

Paul Ruth pruth at renci.org
Thu Jan 26 17:01:03 UTC 2012


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.

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.

Paul



On Jan 18, 2012, at 1:29 PM, Michael J Fork wrote:

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

--scheduler_driver=nova.scheduler.hardware.HardwareScheduler

Michael

-------------------------------------------------
Michael Fork
Cloud Architect, Emerging Solutions
IBM Systems & Technology Group



From:        <J.O'Loughlin at surrey.ac.uk<mailto:J.O'Loughlin at surrey.ac.uk>>
To:        <diego.parrilla.santamaria at gmail.com<mailto:diego.parrilla.santamaria at gmail.com>>
Cc:        openstack-operators at lists.openstack.org<mailto:openstack-operators at lists.openstack.org>
Date:        01/18/2012 12:28 PM
Subject:        Re: [Openstack-operators] set max number of instances per compute node
Sent by:        openstack-operators-bounces at lists.openstack.org<mailto:openstack-operators-bounces at lists.openstack.org>
________________________________




Thanks,

What options would I need to set in nova.conf to change the scheduler to this?

Regards

John O'Loughlin
FEPS IT, Service Delivery Team Leader
________________________________________
From: Diego Parrilla Santamaría [diego.parrilla.santamaria at gmail.com]
Sent: 18 January 2012 16:50
To: O'Loughlin JF Mr (FEPS Faculty Admin)
Cc: fifieldt at unimelb.edu.au<mailto:fifieldt at unimelb.edu.au>; openstack-operators at lists.openstack.org<mailto:openstack-operators at lists.openstack.org>
Subject: Re: [Openstack-operators] set max number of instances per compute node

Everett Toews wrote something really sexy a couple of months ago:

https://github.com/canarie/dair/blob/master/OpenStack/misc/hardware.py

May be you can give it good use!

--
Diego Parrilla
<http://www.stackops.com/>CEO
www.stackops.com<http://www.stackops.com/> |  diego.parrilla at stackops.com<mailto:diego.parrilla at stackops.com> | +34 649 94 43 29 | skype:diegoparrilla
<http://www.stackops.com/>





On Wed, Jan 18, 2012 at 5:33 PM, <J.O'Loughlin at surrey.ac.uk<mailto:J.O%27Loughlin at surrey.ac.uk>> wrote:

Are there any docs on configuring the various schedulers? I'm  putting together a test cloud, and have a variety of different servers.

Regards

John O'Loughlin
FEPS IT, Service Delivery Team Leader
________________________________________
From: Diego Parrilla Santamaría [diego.parrilla.santamaria at gmail.com<mailto:diego.parrilla.santamaria at gmail.com>]
Sent: 18 January 2012 16:28
To: O'Loughlin JF Mr (FEPS Faculty Admin)
Cc: fifieldt at unimelb.edu.au<mailto:fifieldt at unimelb.edu.au>; openstack-operators at lists.openstack.org<mailto:openstack-operators at lists.openstack.org>
Subject: Re: [Openstack-operators] set max number of instances per compute node

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.

Cheers
Diego

--
Diego Parrilla
<http://www.stackops.com/>CEO
www.stackops.com<http://www.stackops.com<http://www.stackops.com/>><http://www.stackops.com/> |  diego.parrilla at stackops.com<mailto:diego.parrilla at stackops.com><mailto:diego.parrilla at stackops.com<mailto:diego.parrilla at stackops.com>> | +34 649 94 43 29<tel:%2B34%20649%2094%2043%2029> | skype:diegoparrilla
<http://www.stackops.com/>

[http://stackops.s3-external-3.amazonaws.com/STACKOPSLOGO-ICON.png]




On Wed, Jan 18, 2012 at 4:57 PM, <J.O'Loughlin at surrey.ac.uk<mailto:J.O%27Loughlin at surrey.ac.uk><mailto:J.O%27Loughlin at surrey.ac.uk<mailto:J.O%2527Loughlin at surrey.ac.uk>>> wrote:

Thanks,

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?

Regards

John O'Loughlin
FEPS IT, Service Delivery Team Leader
________________________________________
From: openstack-operators-bounces at lists.openstack.org<mailto:openstack-operators-bounces at lists.openstack.org><mailto:openstack-operators-bounces at lists.openstack.org<mailto:openstack-operators-bounces at lists.openstack.org>> [openstack-operators-bounces at lists.openstack.org<mailto:openstack-operators-bounces at lists.openstack.org><mailto:openstack-operators-bounces at lists.openstack.org<mailto:openstack-operators-bounces at lists.openstack.org>>] On Behalf Of Tom Fifield [fifieldt at unimelb.edu.au<mailto:fifieldt at unimelb.edu.au><mailto:fifieldt at unimelb.edu.au<mailto:fifieldt at unimelb.edu.au>>]
Sent: 18 January 2012 12:53
To: openstack-operators at lists.openstack.org<mailto:openstack-operators at lists.openstack.org><mailto:openstack-operators at lists.openstack.org<mailto:openstack-operators at lists.openstack.org>>
Subject: Re: [Openstack-operators] set max number of instances per compute node

http://docs.openstack.org/diablo/openstack-compute/admin/content/reference-for-flags-in-nova-conf.html

--max_cores     default: '16'   Integer value; Maximum number of instance
cores to allow per compute host.

Regards,

Tom

On 18/01/12 23:05, J.O'Loughlin at surrey.ac.uk<mailto:J.O%27Loughlin at surrey.ac.uk><mailto:J.O%27Loughlin at surrey.ac.uk<mailto:J.O%2527Loughlin at surrey.ac.uk>> wrote:
>
> All,
>
> 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)
>
> I'm running diablo.
>
> Regards
>
> John O'Loughlin
> FEPS IT, Service Delivery Team Leader
> _______________________________________________
> Openstack-operators mailing list
> Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org><mailto:Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org>>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>

_______________________________________________
Openstack-operators mailing list
Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org><mailto:Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org>>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
_______________________________________________
Openstack-operators mailing list
Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org><mailto:Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org>>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


_______________________________________________
Openstack-operators mailing list
Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


_______________________________________________
Openstack-operators mailing list
Openstack-operators at lists.openstack.org<mailto:Openstack-operators at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20120126/eb85b1fb/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hardware.py
Type: text/x-python-script
Size: 6282 bytes
Desc: hardware.py
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20120126/eb85b1fb/attachment-0002.bin>


More information about the Openstack-operators mailing list