Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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="10.3.1.4"
node oxygen2 \
        attributes standby="off" p_mysql_mysql_master_IP="10.3.1.5"
primitive VIRT_IP ocf:heartbeat:IPaddr2 \
        params ip="192.168.1.250" 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" \
        maintenance-mode="false"
property $id="mysql_replication" \
        p_mysql_REPL_INFO="10.3.1.4|mysql-bin.000030|107"
share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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