[Pacemaker] Required resources for stateful clones

Eamon Roque Eamon.Roque at lex-com.net
Thu May 19 11:05:56 UTC 2011


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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110519/252c9906/attachment-0003.html>


More information about the Pacemaker mailing list