[one-ecosystem] help for source code
Simon Boulet
simon at nostalgeek.com
Tue Apr 24 08:49:43 PDT 2012
Hi,
On Tue, Apr 24, 2012 at 10:05 AM, Carlos Martín Sánchez
<cmartin at opennebula.org> wrote:
>
> As I said, the scheduler is a separate executable from oned (the core). It
> basically queries periodically oned for the list of pending VMs, the
> available hosts, and then for each VM filters the Hosts that match the VM
> requirements: the user has ACL permissions to have his VMs deployed in the
> host, the CPU and MEMORY constraints are met, REQUIREMENTS fit, etc. This
> list of Hosts is then sorted using the defined RANK. Finally, the scheduler
> performs the one.vm.deploy calls
>
Is there any plans to make the scheduler more customizable ie. have a
way for users to hook into the scheduling process and influence the VM
placement? OpenNebula is very flexible and easy to hack thanks to the
different modules implementation. However I have yet to find a way to
easily customize the scheduler.
Here are some of the few things I have in mind:
- Implement scheduler wake up for immediate placement / trigger the
scheduler upon VM creation. I was thinking of adding a SIGHUP signal
handler into the scheduler, and then adding the following HOOK into
oned.conf:
VM_HOOK = [
name = "trigger_scheduler",
on = "CREATE",
command = "/usr/bin/killall -HUP mm_sched",
arguments = "$VMID" ]
- Implement PRE_SCHED and POST_SCHED environment variables (or
something alike). The idea would be to influence the lists of
available hosts. For example:
1- The PRE_SCHED script receives in STDIN the full lists of hosts that
are online, filter out any unwanted hosts, and output a new list in
STDOUT.
2- The scheduler would do normal scheduling policy from the list
received from PRE_SCHED
3- The POST_SCHED receives in STDIN the list of hosts sorted in
descending order by the scheduler, filter out any unwanted hosts, and
output the host to be deployed on in STDOUT.
4- The scheduler calls one.vm.deploy with the host received from POST_SCHED.
What are your thoughts?
Simon
More information about the Ecosystem
mailing list