On Jul 8, 2013, at 4:22 PM, Chris Feist <[email protected]> wrote:

> On 07/08/13 15:57, Jeff Frost wrote:
>> 
>> On Jul 8, 2013, at 12:59 PM, Andreas Kurz <[email protected]> wrote:
>> 
>>> On 2013-07-08 19:40, Jeff Frost wrote:
>>>> We're testing out the pgsql master slave streaming replication resource 
>>>> agent that's found here:
>>>> 
>>>> https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql
>>>> 
>>>> and using the example 2-node configuration found here 
>>>> https://github.com/t-matsuo/resource-agents/wiki/Resource-Agent-for-PostgreSQL-9.1-streaming-replication
>>>> as a template, we came up with the following configuration:
>>>> 
>>>> 
>>>> node node1
>>>> node node2
>>>> primitive pgsql ocf:heartbeat:pgsql \
>>>>  params pgctl="/usr/pgsql-9.2/bin/pg_ctl" psql="/usr/pgsql-9.2/bin/psql" 
>>>> pgdata="/var/lib/pgsql/9.2/data/" start_opt="-p 5432" rep_mode="async" 
>>>> node_list="node1 node2" repuser="replicauser" restore_command="rsync -aq 
>>>> /var/lib/pgsql/wal_archive/%f %p" master_ip="192.168.253.104" 
>>>> stop_escalate="0" \
>>>>  op start interval="0s" role="Master" timeout="60s" on-fail="block"
>>> 
>>> Looks like you are missing the monitor operations ... as described in
>>> the example you are referring. In the monitoring operation such
>>> master-slave agents recalculate their master-score and refresh e.g. in
>>> this RA various node-attributes.
>>> 
>>> And you should follow the described procedures to correctly start-up the
>>> cluster.
>> 
>> 
>> Interesting.
>> 
>> When I set it up, I did it with pcs like so:
>> 
>> pcs -f pgsql_cfg resource create pgsql ocf:heartbeat:pgsql \
>>      params \
>>          pgctl="/usr/pgsql-9.2/bin/pg_ctl" \
>>          psql="/usr/pgsql-9.2/bin/psql" \
>>          pgdata="/var/lib/pgsql/9.2/data/" \
>>          start_opt="-p 5432" \
>>          rep_mode="async" \
>>          node_list="node1 node2" \
>>          repuser="replicauser" \
>>          restore_command="rsync -aq /var/lib/pgsql/wal_archive/%f %p" \
>>          primary_conninfo_opt="keepalives_idle=60 keepalives_interval=5 
>> keepalives_count=5" \
>>          master_ip="192.168.253.104" \
>>          stop_escalate="0" \
>>      op start   timeout="60s" interval="0s"  on-fail="restart" \
>>      op monitor timeout="60s" interval="10s" on-fail="restart" \
>>      op monitor timeout="60s" interval="9s"  on-fail="restart" role="Master" 
>> \
>>      op promote timeout="60s" interval="0s"  on-fail="restart" \
>>      op demote  timeout="60s" interval="0s"  on-fail="stop" \
>>      op stop    timeout="60s" interval="0s"  on-fail="block" \
>>      op notify  timeout="60s" interval="0s"
>> 
>> But when I pull the info out with crm, it appears as in my original post:
>> 
>> primitive pgsql ocf:heartbeat:pgsql \
>>   params pgctl="/usr/pgsql-9.2/bin/pg_ctl" psql="/usr/pgsql-9.2/bin/psql" 
>> pgdata="/var/lib/pgsql/9.2/data/" start_opt="-p 5432" rep_mode="async" 
>> node_list="node1 node2" repuser="replicauser" restore_command="rsync -aq 
>> /var/lib/pgsql/wal_archive/%f %p" master_ip="192.168.253.104" 
>> stop_escalate="0" \
>>   op start interval="0s" role="Master" timeout="60s" on-fail="block"
>> 
>> and definitely missing the monitor operations as you point out.
>> 
>> And sure enough, using crm to configure it causes it work as expected.  I 
>> guess that's what I get for trying to use pcs.
>> 
>> Any idea how it should be done with pcs?
> 
> Do you know which version of pcs you're using?  On the latest version I 
> tested your command line and it created all of the operations.

Yah, it's the latest centos 6 package:

pcs-0.9.26-10.el6_4.1.noarch

interestingly, it doesn't give me any errors, but it also seems like it munged 
the stuff together because op start shouldn't have a role= in it. Odd.

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to