On 08/13/2013 08:40 AM, Martin Arrieta wrote:
Hi all,

I'm trying to reproduce the following command with pcs without luck

crm primitive p_mysql ocf:percona:mysql \
       params config="/etc/my.cnf" pid="/var/lib/mysql/mysqld.pid"
socket="/var/run/mysqld/mysqld.sock" replication_user="repl_user" \
              replication_passwd="repluser" max_slave_lag="60"
evict_outdated_slaves="false" binary="/usr/libexec/mysqld" \
              test_user="test_user" test_passwd="testuser" \
       op monitor interval="5s" role="Master" OCF_CHECK_LEVEL="1" \
       op monitor interval="2s" role="Slave" OCF_CHECK_LEVEL="1" \
       op start interval="0" timeout="60s" \
       op stop interval="0" timeout="60s"

You can find the resource here:

https://github.com/percona/percona-pacemaker-agents/blob/master/agents/mysql_prm

And the xml of the resource  here:

http://pastebin.com/yRMV2SVj

Any help will be greatly appreciated!

Previous versions of pcs didn't support the OCF_CHECK_LEVEL option for op 
monitors.

If you'd be willing to try out the upstream version here: https://github.com/feist/pcs

You shouldn't have a problem adding that resource:

The command should look something like this:
pcs resource create p_mysql ocf:percona:mysql \
 config="/etc/my.cnf" pid="/var/lib/mysql/mysqld.pid" \
 socket="/var/run/mysqld/mysqld.sock"  \
 replication_user="repl_user" replication_passwd="repluser" \
 max_slave_lag="60" evict_outdated_slaves="false" \
 binary="/usr/libexec/mysqld" test_user="test_user" test_passwd="testuser" \
 op monitor interval="5s" role="Master" OCF_CHECK_LEVEL="1" \
 op monitor interval="2s" role="Slave" OCF_CHECK_LEVEL="1" \
 op start interval="0" timeout="60s" \
 op stop interval="0" timeout="60s"

Let me know if you have any issues.

Thanks!
Chris


Martin.



_______________________________________________
Pacemaker mailing list: Pacemaker@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://bugs.clusterlabs.org



_______________________________________________
Pacemaker mailing list: Pacemaker@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://bugs.clusterlabs.org

Reply via email to