[Haizea] How to customize the host selection policy in Haizea with opennebula?Thank you!

柯俊峰 kjf620520 at gmail.com
Fri Oct 16 01:25:12 CDT 2009


Hi all,

Now, I’m reading Haizea’s source code!

I’m using Haizea alongside OpenNebula and prepare to customize Haizea!

I want to implement Load-aware Policy which impletmented by using those
nodes with more FREECPU first.

Just shows at website
http://www.opennebula.org/doku.php?id=documentation:rel1.4:schg

Want to prepare to customize Haizea.

The haizea Manual(1.0beta2) 8.3 Host selection have following context:

*from haizea.core.scheduler.policy import HostSelectionPolicy*

*class NoPolicy(HostSelectionPolicy):*

*def __init__(self, slottable):*

*HostSelectionPolicy.__init__(self, slottable)*

*def get_host_score(self, node, time, lease):*

*# Your code goes here*

My code should how to program to implement Load-aware Policy? Just think
about the free cpu of physical nodes, if physical node have more free cpu ,
physical node’s score is more higher.

       May be used the xmlrpc of opennebula?

But I don’t know how to do, can you give me a code example?

More desireble, I can use Load-aware Policy by the way as follows!

If I have a VM template file named test1.cfg,like this:

*NAME = test1 CPU = 0.5 *

*MEMORY = 256 *

*Policy = **Load-awarePolicy** **or Policy = **GreedyPolicy***

*OS = [ bootloader = "/usr/bin/pygrub" ] *

*DISK = [ *

*source = "/opt/nebula/images/centos5.2.img", *

*target = "xvda", *

*readonly = "no" ] *

*NIC=[ NETWORK="pub1", IP="10.8.2.185" ] *

In this way, the user can dynamicly to select which policy in the runtime
will be used without having modified the configure file like this :

 [scheduling]

...

policy-host-selection: no-policy | greedy | <custom policy>

if modified the configure file like above, user may need to restart haizea
to support another policy.



The last question is how to use Haizea group option.

The group means :

group: This option can take on any string value, and allows you to schedule
several VMs as a group (or, in Haizea terminology, as a single lease with
multiple nodes).All OpenNebula VM templates with the same group name will be
considered part of the same lease (i.e., all the VMs will be scheduled in a
all-or-nothing fashion: all VMs must be able to start/stop at the same
time). Future versions of OpenNebula will automatically manage this option,
so users don't have to worry about manually setting this option in multiple
VM templates (which can be error-prone).

Can you give me a example how to use Haizea group option.

Thank you for your time!

Best Regards,

       Jerry.
<haizea at mailman.cs.uchicago.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.uchicago.edu/pipermail/haizea/attachments/20091016/17a7fd2f/attachment.htm 


More information about the Haizea mailing list