Hi Nathanaël,
happy to assist :) hope it will work in first run:
1) install the proxy and ovirtsdk.
2) put attached file in the right place (according to docs: ".../plugins"),
make sure to edit the file with your ovirt's ip, user@domain and PW.
3) restart proxy service.
3) use config tool to configure ovirt-engine:
* "ExternalSchedulerServiceURL"="http://<ip>:18781/"
* "ExternalSchedulerEnabled"=true
4) restart ovirt-engine service.
5) under configure->cluster_policy see that weight function
memory_even_distribution was added (should be in manage policy units or /sth-
you will see it in the main dialog as well).
6) clone/copy currernt cluster's used cluster policy (probably none - prefer it
to have no balancing modules to avoid conflicts), name it 'your_name' and
attach memory_even_distribution weight (you can leave it as the only weight
module in weight section to avoid configuring factors).
7) replace cluster's cluster policy with newly created one.
try it out and let me know how goes :-)
Thanks,
Gilad.
----- Original Message -----
> From: "Nathanaël Blanchet" <[email protected]>
> To: "Gilad Chaplik" <[email protected]>
> Cc: "Karli Sjöberg" <[email protected]>, "users" <[email protected]>
> Sent: Monday, May 26, 2014 12:12:41 PM
> Subject: Re: [ovirt-users] SLA : RAM scheduling
>
> Hi Gilad,
>
> Yes, I'm interested in that feature, I'vebegun to read this following
> your advices
> http://www.ovirt.org/Features/oVirt_External_Scheduling_Proxy, I don't
> think I will have time enough to get it work quickly, I'm not
> experienced enough with this kind of feature, unless you help me.
>
> Le 24/05/2014 10:49, Gilad Chaplik a écrit :
> > Hi Nathanaël,
> >
> > You have 2 ways to get what you're after (quick/slow):
> > 1) install 'oVirt's external scheduling proxy', and write an extremely
> > simple weight function that orders hosts by used memory, then add that to
> > your cluster policy.
> > 2) open an RFE for oVirt 3.4 to have that in
> > (https://bugzilla.redhat.com/enter_bug.cgi?product=oVirt).
> >
> > let me know if you consider (1), and I'll assist.
> >
> > anyway I suggest you'll open an RFE for 3.5.
> >
> > Thanks,
> > Gilad.
> >
> > ----- Original Message -----
> >> From: "Nathanaël Blanchet" <[email protected]>
> >> To: "Karli Sjöberg" <[email protected]>
> >> Cc: "users" <[email protected]>
> >> Sent: Friday, May 23, 2014 7:38:40 PM
> >> Subject: Re: [ovirt-users] SLA : RAM scheduling
> >>
> >> even distribution is for cpu only
> >>
> >> Le 23/05/2014 17:48, Karli Sjöberg a écrit :
> >>
> >>
> >>
> >>
> >>
> >> Den 23 maj 2014 17:13 skrev =?ISO-8859-1?Q?Nathana=EBl_Blanchet?=
> >> <[email protected]> :
> >>>
> >>> Le 23/05/2014 17:11, Nathanaël Blanchet a écrit :
> >>>> Hello,
> >>>> On ovirt 3.4, is it possible to schedule vms distribution depending on
> >>>> host RAM availibility?
> >>>> Concretly, I had to manually move vms all the vms to the second host
> >>>> of the cluster, this lead to reach 90% occupation of memory on the
> >>>> destination host. When my first host has rebooted, none vms of the
> >>>> second host automatically migrated to the first one which had full
> >>>> RAM. How to make this happen?
> >>>>
> >>> ... so as to both hosts be RAM evenly distributed... hope to be enough
> >>> clear...
> >> Sounds like you just want to apply the cluster policy for even
> >> distribution.
> >> Have you assigned any policy for that cluster?
> >>
> >> /K
> >>
> >>> --
> >>> Nathanaël Blanchet
> >>>
> >>> Supervision réseau
> >>> Pôle exploitation et maintenance
> >>> Département des systèmes d'information
> >>> 227 avenue Professeur-Jean-Louis-Viala
> >>> 34193 MONTPELLIER CEDEX 5
> >>> Tél. 33 (0)4 67 54 84 55
> >>> Fax 33 (0)4 67 54 84 14
> >>> [email protected]
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> [email protected]
> >>> http://lists.ovirt.org/mailman/listinfo/users
> >> --
> >> Nathanaël Blanchet
> >>
> >> Supervision réseau
> >> Pôle exploitation et maintenance
> >> Département des systèmes d'information
> >> 227 avenue Professeur-Jean-Louis-Viala
> >> 34193 MONTPELLIER CEDEX 5
> >> Tél. 33 (0)4 67 54 84 55
> >> Fax 33 (0)4 67 54 84 14 [email protected]
> >>
> >> _______________________________________________
> >> Users mailing list
> >> [email protected]
> >> http://lists.ovirt.org/mailman/listinfo/users
> >>
>
> --
> Nathanaël Blanchet
>
> Supervision réseau
> Pôle exploitation et maintenance
> Département des systèmes d'information
> 227 avenue Professeur-Jean-Louis-Viala
> 34193 MONTPELLIER CEDEX 5
> Tél. 33 (0)4 67 54 84 55
> Fax 33 (0)4 67 54 84 14
> [email protected]
>
>
from ovirtsdk.xml import params
from ovirtsdk.api import API
import sys
class memory_even_distribution():
'''rank hosts by even ram distribution'''
properties_validation = ''
def _get_connection(self):
#open a connection to the rest api
connection = None
try:
connection = API(url='http://host:port',
username='user@domain', password='')
except BaseException as ex:
#letting the external proxy know there was an error
print >> sys.stderr, ex
return None
return connection
def _get_hosts(self, host_ids, connection):
#get all the hosts with the given ids
engine_hosts = connection.hosts.list(
query=" or ".join(["id=%s" % u for u in host_ids]))
return engine_hosts
def do_score(self, hosts_ids, vm_id, args_map):
conn = self._get_connection()
if conn is None:
return
engine_hosts = self._get_hosts(hosts_ids, conn)
#iterate over them and weigh them based on available ram
host_scores = []
for engine_host in engine_hosts:
if(engine_host and
engine_host.max_scheduling_memory):
host_scores.append((engine_host.id,
abs(0 - engine_host.max_scheduling_memory)))
print host_scores
_______________________________________________
Users mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/users