[Pacemaker] Required resources for stateful clones

Serge Dubrouski sergeyfd at gmail.com
Thu May 19 10:10:41 EDT 2011


On Thu, May 19, 2011 at 5:05 AM, Eamon Roque <Eamon.Roque at lex-com.net>wrote:

> Hi,
>
> I've put together a cluster of two nodes running a databank without shared
> storage. Both nodes replicate data between them, which is taken care of by
> the databank itself.
>
> I have a resource for the databank and ip. I then created a stateful clone
> from the databank resource. I created colocation rules joining the
> databank-ms-clone and ip:
>
> node pgsqltest1
> node pgsqltest2
> primitive Postgres-IP ocf:heartbeat:IPaddr2 \
>         params ip="10.19.57.234" cidr_netmask="32" \
>         op monitor interval="30s" \
>         meta is-managed="false"
> primitive resPostgres ocf:heartbeat:pgsql \
>         params pgctl="/opt/PostgreSQL/9.0/bin/pg_ctl"
> pgdata="/opt/PostgreSQL/9.0/data" psql="/opt/PostgreSQL/9.0/bin/psql"
> pgdba="postgres" \
>         op monitor interval="1min" \
>         meta is-managed="false"
> ms msPostgres resPostgres \
>         meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true" target-role="started"
> colocation colPostgres inf: Postgres-IP msPostgres:Master
> order ordPostgres inf: msPostgres:promote Postgres-IP:start
> property $id="cib-bootstrap-options" \
>         dc-version="1.1.2-2e096a41a5f9e184a1c1537c82c6da1093698eb5" \
>         cluster-infrastructure="openais" \
>         expected-quorum-votes="2" \
>         stonith-enabled="false" \
>         no-quorum-policy="ignore" \
>         last-lrm-refresh="1302707146"
> rsc_defaults $id="rsc-options" \
>         resource-stickiness="200"
> op_defaults $id="op_defaults-options" \
>         record-pending="false"
>
> The normal postgres agent doesn't support this functionality, but I've put
> together my own using the mysql agent as a model. Before running the script
> through ocf-tester, I unmanage the postgres resource.
>

Could you show how you implemented promote/demote for pgsql?


>
> Unfortunately, promote/demote doesn't work. ocf-tester tries to use the
> "crm_attribute -N pgsql1 -n master-pgrql-replication-agent -l reboot -v
> 100", but the (unmanaged) resources don't accept the score change.
>
> I'm pretty sure that I just need to be hit with a clue stick and would be
> grateful for any help.
>
> Thanks,
>
> Éamon
>
> _______________________________________________
> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>


-- 
Serge Dubrouski.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110519/a7b84b91/attachment-0003.html>


More information about the Pacemaker mailing list