I want to configure my pacemaker for jboss server. I have 2 nodes with mysql master/slave configured. The problem is I want to start jboss on node which is located master database. The one possible solution for this: Start jboss on 2 nodes, but deploy application only in one node where master is located. How can I solve this?

My current configuration is:

node oxygen \
        attributes standby="off" p_mysql_mysql_master_IP=""
node oxygen2 \
        attributes standby="off" p_mysql_mysql_master_IP=""
primitive VIRT_IP ocf:heartbeat:IPaddr2 \
        params ip="" nic="eth1" \
        meta target-role="Started"
primitive p_mysql ocf:percona:mysql \
        params config="/etc/mysql/my.cnf" pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" replication_user="repl_user" replication_passwd="ola5P1ZMU" max_slave_lag="60" evict_outdated_slaves="false" binary="/usr/bin/mysqld_safe" test_user="test_user" test_passwd="2JcXCxKF" \
        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"
ms ms_MySQL p_mysql \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" globally-unique="false" target-role="Started" is-managed="true"
property $id="cib-bootstrap-options" \
        dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        stop-all-resources="false" \
property $id="mysql_replication" \

I have do similar configuration to make sure the virtual IP to live along with Mysql master server. For your case, I think the steps should be:

  • Add a primitive for two JBOSS intances (as your shareIP or MySQL servers)
  • Add colocation configure for JBOSS primitive to live along with MySQL Master as example below: colocation mysql_co_jboss inf: jboss ms_MySQL:Master
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.