[Linux-HA] Resource colocation with a clone.
andrew at beekhof.net
Wed Mar 17 15:08:14 MDT 2010
On Wed, Mar 17, 2010 at 6:44 PM, Michele Codutti
<michele.codutti at uniud.it> wrote:
> Hi all, It's possible to constrain a resource to run only on nodes where also runs an instance of a patricular clone?
> Example: I've a database-like application that i've setup as a clone to run one instance for every node. Only one instance of this application could be queried the other ones are in stand-by ready do takeover in case of the active instance would fail. So i configure an IPaddr2 resource (single/primitive) with a service IP that can run on any node of the cluster.
> Now what I want is to constrain the IP resource to run where an instance of my clone resource is running.
> Otherwise the clients cannot query any running service.
> So I wrote this constrain:
> <rsc_colocation id="ip_runs_with_service" from="ip" to="service" score="INFINITY">
> Where the name of the clone is "service" and the name of the primitive resource is "ip".
> But it didn't work.
> Could i achieve the result in a different way?
Probably swap the values of from and to.
OR, upgrade to pacemaker and get an improved syntax :-)
Even I couldn't remember which way from and to worked all the time.
> Thanks in advance.
> Michele Codutti
> Centro Servizi Informatici e Telematici (CSIT)
> Universita' degli Studi di Udine
> via Delle Scienze, 208 - 33100 UDINE
> tel +39 0432 558928
> fax +39 0432 558911
> e-mail: michele.codutti at uniud.it
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> See also: http://linux-ha.org/ReportingProblems
More information about the Linux-HA