[ClusterLabs] How to declare ping primitive with rule

Salvatore D'angelo sasadangelo at gmail.com
Fri Jun 8 12:59:44 EDT 2018

Hi All,

I have a PostgreSQL cluster on three nodes (Master/Sync/Async) with WAL files stored on two GlusterFS nodes. In total, 5 machines.
Let call the first three machines: pg1, pg2, pg3. The other two (without pacemaker): pgalog1, pgalog2.

Now I this code works fine on some bare metal machines. I was able to port it on Docker (because this simplify tests and allow us to experiment). So far so good.

I wasn’t the original author of the code. Now we have some scripts to create this cluster that works fine on bare metal as said before. In particular, I have this piece of code:

cat - <<EOM | crm configure || logFailure 'Unable to set Cluster Policy’
primitive p_pgsPing ocf:pacemaker:ping \\
	params 3: rule #uname eq pg3 host_list= multiplier=100 dampen=6s \\
	params 2: rule #uname eq pg2 host_list= multiplier=100 dampen=6s \\
	params 1: rule #uname eq pg1 host_list= multiplier=100 dampen=6s \\
	op monitor interval=6 timeout=60 \\
	op start interval=0 timeout=60 \\
	op stop interval=0 timeout=60 \\
	meta is-managed=true

my problem is that I want to give this command from command line:

cam configure primitive p_pgsPing ocf:pacemaker:ping ….

but I do not know the right syntax to manage “params” and “rule" from command line. Can someone on this email list help me to find the right syntax?
Thanks in advance for your help.

More information about the Users mailing list