Hi Simon,<div><br class="Apple-interchange-newline">On Wed, May 2, 2012 at 4:35 AM, Simon Boulet <span dir="ltr"><<a href="mailto:simon@nostalgeek.com" target="_blank">simon@nostalgeek.com</a>></span> wrote:</div><div>

<br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The PRE_SCHED and POST_SCHED scripts would allow for more flexible and<br>

dynamic scheduling. For example, one that want to add custom RANK<br>according to the Host disk i/o performance (I think the new Datastore<br>can do this, I haven't look at it yet),  according to the host<br>environment temperature (ex. prevent deploying on a host that is<br>

located in a hot spot of the DC), </blockquote><div><br></div><div>I think the custom RANK expression in sched.conf [1] covers this. You just need to add a new probe in your im driver [2], let's say IO_PERFORMANCE, and then put in /etc/one/sched.conf</div>

<br>DEFAULT_SCHED = [<br>  policy = 3,<br>  rank   = "IO_PERFORMANCE"<br>]<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

or filter out hosts that have low<br>uptime, etc.<br></blockquote><div><br></div><div>This can only be done per VM, using VM/REQUIREMENTS. To be able to implement you scenario, we would need to add in sched.conf support for something like</div>

<div><br></div><div>DEFAULT_REQUIREMENTS = "UPTIME > 1234"</div><div><br></div><div>I think this can be very helpful to tune the scheduler behaviour, we will consider it [3] for the next release.</div><div> </div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In my scenario, I have a set of very specific disk images that are<br>

available only on certain hosts and that I can't transfer. My idea is<br>to implement a PRE_SCHED script, parse the VM template that is to be<br>deployed for images definitions, lookup which hosts can fulfill the<br>
special disk image requirement, and feed the scheduler with the list<br>
of hosts that have the image.<br></blockquote><div><br></div><div>This is done automatically if you use the same datastore to store these special images.</div><div>If you assign a datastore to a Cluster, OpenNebula makes sure that VMs using images</div>

<div>from that datastore are deployed in a suitable Host, adding to the VM requirements</div><div><br></div><div>CLUSTER_ID = 123</div><div><br></div><div><br></div><div>I have also opened a ticket with your SIGHUP request [4]</div>

<div>Thank you for your feedback,</div></div><div>Cheers!</div><div><br></div><div><span style>[1] </span><a href="http://opennebula.org/documentation:rel3.4:schg" target="_blank" style>http://opennebula.org/documentation:rel3.4:schg</a></div>

<div>[2] <a href="http://opennebula.org/documentation:rel3.4:img">http://opennebula.org/documentation:rel3.4:img</a></div><div>[3] <a href="http://dev.opennebula.org/issues/1283">http://dev.opennebula.org/issues/1283</a></div>

<div>[4] <a href="http://dev.opennebula.org/issues/1282">http://dev.opennebula.org/issues/1282</a></div><div><br></div><div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div>

<span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>

<br>
<br><br><div class="gmail_quote">On Wed, May 2, 2012 at 4:35 AM, Simon Boulet <span dir="ltr"><<a href="mailto:simon@nostalgeek.com" target="_blank">simon@nostalgeek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Carlos<br>
<div class="im"><br>
On Fri, Apr 27, 2012 at 5:51 AM, Carlos Martín Sánchez<br>
<<a href="mailto:cmartin@opennebula.org">cmartin@opennebula.org</a>> wrote:<br>
><br>
> If you have 10 pending VMs, the current code will retrieve the list of VMs,<br>
> Hosts and ACL rules once, and perform the matching and deployments. If the<br>
> scheduling is triggered 10 times, the Host & ACL list will have to be<br>
> retrieved 10 times. There is also the problem of the capacity: if two<br>
> separate scheduling actions are triggered at the same time, both may send a<br>
> total of 2 VMs to a host that has only capacity for 1.<br>
<br>
</div>Yes, of course, perhaps forcing a reschedule each time a VM is<br>
deployed through a deploy hook isn't ideal for every scenario. But I<br>
think being able to manually wake up the scheduler can be very handful<br>
in some cases.<br>
<div class="im"><br>
><br>
> Anyway, please open a feature request at our dev. portal and we will<br>
> consider it for next releases.<br>
><br>
><br>
> About the host filtering using this pre & post scripts, if I understood<br>
> correctly, that functionality is already implemented as REQUIREMENTS and<br>
> RANK:<br>
><br>
<br>
</div>The PRE_SCHED and POST_SCHED scripts would allow for more flexible and<br>
dynamic scheduling. For example, one that want to add custom RANK<br>
according to the Host disk i/o performance (I think the new Datastore<br>
can do this, I haven't look at it yet),  according to the host<br>
environment temperature (ex. prevent deploying on a host that is<br>
located in a hot spot of the DC), or filter out hosts that have low<br>
uptime, etc.<br>
<br>
In my scenario, I have a set of very specific disk images that are<br>
available only on certain hosts and that I can't transfer. My idea is<br>
to implement a PRE_SCHED script, parse the VM template that is to be<br>
deployed for images definitions, lookup which hosts can fulfill the<br>
special disk image requirement, and feed the scheduler with the list<br>
of hosts that have the image.<br>
<br>
I've found Open Nebula to be very flexible / easy to hack into thanks<br>
to the different drivers implementation, expect for the scheduler<br>
which requires editing C++ code and recompiling.<br>
<span class="HOEnZb"><font color="#888888"><br>
Simon<br>
</font></span></blockquote></div><br></div>