Does resource-agents-3.9.2-21.el6_4.3.x86_64 include this patch ? https://github.com/ClusterLabs/resource-agents/commit/ffc9c6444996144076ef2b4bc79a38569e05250a#heartbeat/pgsql
I recommed you to use latest pgsql RA. https://raw.github.com/ClusterLabs/resource-agents/bb62ffcd8381884a8e498f85f1861c2a21be2720/heartbeat/pgsql You can replace /usr/lib/ocf/resource.d/heartbeat/pgsql with it. 2013/7/9 Chris Feist <[email protected]>: > 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. > > Thanks! > Chris > >> >> >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems >> > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
