Thanks Lars.
Actually I've managed my RA (in cib.xml) in a way that pacemaker will always
force it to run in a master role on the node which is DC.
I've defined a rule (with score INFINITY) in which I've defined a
constraint.
<rsc_location id="rsc_location" rsc="pgsql9">
<rule id="pgsql_master_rule" score="INFINITY">
<expression attribute="#is_dc" id="rule_expression" operation="eq"
value="true"/>
</rule>
</rsc_location>
I've also defined virtual IP as a co-located resource
<rsc_colocation id="pgsql_vip_colocation" rsc="virtua_ip" score="INFINITY"
with-rsc="pgsql9" with-rsc-role="Master"/>
The intention behind defining such constraints is to make sure that the
postgre should always run in the master role on the node which is a DC.
Is something wrong with this?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lars Marowsky-Bree
Sent: 06 February 2012 20:07
To: General Linux-HA mailing list
Subject: Re: [Linux-HA] Antw: Re: FW: How DC is selected?
On 2012-02-06T09:05:13, Ulrich Windl <[email protected]>
wrote:
> but like with CPU affinity there should be no needless change of the DC. I
also wondered why after each configuration change the DC is newly elected
(it seems).
It isn't (or shouldn't be). Still, the DC election is an internal detail
that shouldn't matter to you, unless the re-election is so frequent that it
causes a performance problem ;-)
That also isn't what the original question was about; after split brain
resolution, the "winning" DC is essentially undefined. (It isn't, of course,
but if we explain the algorithm people will come to rely on it for the wrong
reasons.)
But, anyway, the key elements are:
- Oldest version takes precedence;
- Longest uptime;
- Node uuid (essentially random, but a defined internal tie-breaker)
But it really doesn't matter, except in the first case.
Regards,
Lars
--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer,
HRB 21284 (AG Nürnberg) "Experience is the name everyone gives to their
mistakes." -- Oscar Wilde
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2112/4792 - Release Date: 02/06/12
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems