[Pacemaker] PGSQL resource promotion issue

Steven Bambling smbambling at arin.net
Wed Mar 27 09:37:40 EDT 2013


In talking with andreask from IRC, I  miss understood the need to include the op monitor.  I figured it was pulled from the resource script by default.

I used pcs to add the new attributes and one was then promoted to master 

pcs resource add_operation PGSQL monitor interval=5s role=Master
pcs resource add_operation PGSQL monitor interval=7s

v/r

STEVE

On Mar 27, 2013, at 7:08 AM, Steven Bambling <smbambling at arin.net> wrote:

> 
> I've built and installed the lastest resource-agents from github on Centos 6 and configured two resources 
> 
> 1 primitive PGVIP:
> pcs resource create PGVIP ocf:heartbeat:IPaddr2 ip=10.1.22.48 cidr_netmask=25 op monitor interval=1
> 
> Before setting up the PGSQL resource I manually configured sync/streaming replication on the three nodes with p1.example.com as the master and verified that replication was working.  I think removed the synchronous_standby_name from my postgresql.conf and stop all postgres services on all nodes
> 
> 1 master/slave PGSQL: -- I've the resource to use sync replication.  Also I am using PGSQL 9.2.3
> 
> pcs resource create PGSQL ocf:heartbeat:pgsql params pgctl="/usr/pgsql-9.2/bin/pg_ctl" pgdata="/var/lib/pgsql/9.2/data" config="/var/lib/pgsql/9.2/data/postgresql.conf" stop_escalate="5" rep_mode="sync" node_list="p1.example.com p2.example.com p3.example.com" restore_command='cp /var/lib/pgsql/9.2/archive/%f "%p"' master_ip="10.1.22.48" repuser="postgres" restart_on_promote="true" tmpdir="/var/lib/pgsql/9.2/tmpdir" xlog_check_count="3" crm_attr_timeout="5" check_wal_receiver="true" --master
> 
> I'm able to successfully get all the nodes in the cluster started and the PGVIP resource starts on the 1st node and the PGSQL:[012] resource start on each node in the cluster.  The one thing I don't understand is why none of the slaves is taking over the master role.
> 
> Also how would I go about force promoting one of the slaves into the master role via the PCS command line utility. 
> 
> v/r
> 
> STEVE
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130327/416dc330/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130327/416dc330/attachment-0003.sig>


More information about the Pacemaker mailing list