Hi, On Tue, Sep 28, 2010 at 11:00:18AM +0200, Sascha Reimann wrote: > howdy! > > I'm trying to configure a resource (xen-domU) that could start on 2 > nodes (preferred on node server01): > > primitive v01 ocf:heartbeat:Xen \ > params xmfile="/etc/xen/conf.d/v01.cfg" allow-migrate="true" > location loc-v01p v01 200: server01 > location loc-v01s v01 100: server02 > > That's working fine so far, but I want to ensure that there's enough > hardwareresources available on server01, so I've set up a modified > SysInfo-RA to put the ram_total and ram_free values of xen (xm > info|awk '/free_memory/ {print $3}') to the statusinformation of the > CIB: > > server01:~$ cibadmin -Q -o status|grep status-server01-ram > <nvpair id="status-server01-ram_total" name="ram_total" value="8191"/> > <nvpair id="status-server01-ram_free" name="ram_free" value="2000"/> > > This is working fine, too. BUT: > > When I create a rule like the one below, the xen-domU keeps > restarting (or moving to server02 where the same happens), which is > correct since the SysInfo-RA updates the statusinformation to > value="0" after a start and back to value="2000" after a stop in > this example. > > location loc-resv01 v01 \ > rule $id="loc-resv01-rule" -inf: ram_free lt 2000
An interesting issue :-) Well, you can introduce resource stickiness and use that to outweigh the negative score coming from the lack of memory (use something less than inf). You may also consider using the amount of free memory as a score. HTH, Dejan > Can anybody help? > > _______________________________________________ > Pacemaker mailing list: Pacemaker@oss.clusterlabs.org > http://oss.clusterlabs.org/mailman/listinfo/pacemaker > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: > http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker