[Pacemaker] Ordering set of resources, problem in ordering chain of resources

Andrew Beekhof andrew at beekhof.net
Mon May 2 12:07:55 UTC 2011


On Wed, Apr 20, 2011 at 9:09 AM, Rakesh K <rakirocker4236 at gmail.com> wrote:
> Andrew Beekhof <andrew at ...> writes:
>
> Hi Andrew
>
> thanks for giving replies
>  sorry for troubling you  frequently

no problem

>
> here is the out put of crm configure show xml

Doh. For some reason I thought show xml included the status.
Can you try "cibadmin -Ql" instead please?

> <?xml version="1.0" ?>
> <cib admin_epoch="0" crm_feature_set="3.0.1"
> dc-uuid="87b8b88e-3ded-4e34-8708-46f7afe62935" epoch="1120" have-quorum="1"
> num_updates="35" validate-with="pacemaker-1.0">
>  <configuration>
>    <crm_config>
>      <cluster_property_set id="cib-bootstrap-options">
>        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
> value="1.0.9-89bd754939df5150de7cd76835f98fe90851b677"/>
>        <nvpair id="cib-bootstrap-options-cluster-infrastructure"
> name="cluster-infrastructure" value="Heartbeat"/>
>        <nvpair id="cib-bootstrap-options-stonith-enabled"
> name="stonith-enabled" value="false"/>
>        <nvpair id="cib-bootstrap-options-no-quorum-policy"
> name="no-quorum-policy" value="ignore"/>
>        <nvpair id="cib-bootstrap-options-last-lrm-refresh"
> name="last-lrm-refresh" value="1300787402"/>
>      </cluster_property_set>
>    </crm_config>
>    <rsc_defaults>
>      <meta_attributes id="rsc-options">
>        <nvpair id="rsc-options-resource-stickiness" name="resource-stickiness"
> value="100"/>
>      </meta_attributes>
>    </rsc_defaults>
>    <op_defaults/>
>    <nodes>
>      <node id="6317f856-e57b-4a03-acf1-ca81af4f19ce" type="normal"
> uname="cisco-demomsf"/>
>      <node id="87b8b88e-3ded-4e34-8708-46f7afe62935" type="normal" uname="mysql3"/>
>    </nodes>
>    <resources>
>      <master id="MS_Mysql">
>        <meta_attributes id="MS_Mysql-meta_attributes">
>          <nvpair id="MS_Mysql-meta_attributes-notify" name="notify" value="true"/>
>          <nvpair id="MS_Mysql-meta_attributes-target-role" name="target-role"
> value="Stopped"/>
>        </meta_attributes>
>        <primitive class="ocf" id="Mysql" provider="heartbeat" type="mysql">
>          <instance_attributes id="Mysql-instance_attributes">
>            <nvpair id="Mysql-instance_attributes-binary" name="binary"
> value="/usr/bin/mysqld_safe"/>
>            <nvpair id="Mysql-instance_attributes-config" name="config"
> value="/etc/my.cnf"/>
>            <nvpair id="Mysql-instance_attributes-datadir" name="datadir"
> value="/var/lib/mysql"/>
>            <nvpair id="Mysql-instance_attributes-user" name="user" value="mysql"/>
>            <nvpair id="Mysql-instance_attributes-pid" name="pid"
> value="/var/lib/mysql/mysql.pid"/>
>            <nvpair id="Mysql-instance_attributes-socket" name="socket"
> value="/var/lib/mysql/mysql.sock"/>
>            <nvpair id="Mysql-instance_attributes-test_passwd"
> name="test_passwd" value="slavepass"/>
>            <nvpair id="Mysql-instance_attributes-test_table" name="test_table"
> value="msfha.conn"/>
>            <nvpair id="Mysql-instance_attributes-test_user" name="test_user"
> value="repl"/>
>            <nvpair id="Mysql-instance_attributes-replication_user"
> name="replication_user" value="repl"/>
>            <nvpair id="Mysql-instance_attributes-replication_passwd"
> name="replication_passwd" value="slavepass"/>
>          </instance_attributes>
>          <operations>
>            <op id="Mysql-start-0" interval="0" name="start" timeout="120s"/>
>            <op id="Mysql-stop-0" interval="0" name="stop" timeout="120s"/>
>            <op id="Mysql-monitor-10s" interval="10s" name="monitor"
> role="Master" timeout="8s"/>
>            <op id="Mysql-monitor-12s" interval="12s" name="monitor" timeout="8s"/>
>          </operations>
>        </primitive>
>      </master>
>      <primitive class="ocf" id="Tomcat1VIP" provider="heartbeat" type="IPaddr3">
>        <instance_attributes id="Tomcat1VIP-instance_attributes">
>          <nvpair id="Tomcat1VIP-instance_attributes-ip" name="ip"
> value="172.21.52.140"/>
>          <nvpair id="Tomcat1VIP-instance_attributes-eth_num" name="eth_num"
> value="eth0:2"/>
>          <nvpair id="Tomcat1VIP-instance_attributes-vip_cleanup_file"
> name="vip_cleanup_file" value="/var/run/bigha.pid"/>
>        </instance_attributes>
>        <operations>
>          <op id="Tomcat1VIP-start-0" interval="0" name="start" timeout="120s"/>
>          <op id="Tomcat1VIP-monitor-30s" interval="30s" name="monitor"/>
>        </operations>
>        <meta_attributes id="Tomcat1VIP-meta_attributes">
>          <nvpair id="Tomcat1VIP-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <primitive class="ocf" id="Tomcat1" provider="msf" type="tomcat">
>        <instance_attributes id="Tomcat1-instance_attributes">
>          <nvpair id="Tomcat1-instance_attributes-tomcat_name"
> name="tomcat_name" value="tomcat"/>
>          <nvpair id="Tomcat1-instance_attributes-statusurl" name="statusurl"
> value="http://localhost:8080/dbtest/testtomcat.html"/>
>          <nvpair id="Tomcat1-instance_attributes-java_home" name="java_home"
> value="/"/>
>          <nvpair id="Tomcat1-instance_attributes-catalina_home"
> name="catalina_home" value="/home/msf/runtime/tomcat/apache-tomcat-6.0.18"/>
>          <nvpair id="Tomcat1-instance_attributes-client" name="client"
> value="curl"/>
>          <nvpair id="Tomcat1-instance_attributes-testregex" name="testregex"
> value="*</html>"/>
>        </instance_attributes>
>        <operations>
>          <op id="Tomcat1-start-0" interval="0" name="start" timeout="60s"/>
>          <op id="Tomcat1-monitor-50s" interval="50s" name="monitor" timeout="50s"/>
>          <op id="Tomcat1-stop-0" interval="0" name="stop"/>
>        </operations>
>        <meta_attributes id="Tomcat1-meta_attributes">
>          <nvpair id="Tomcat1-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <primitive class="ocf" id="Tomcat2" provider="msf" type="tomcat">
>        <instance_attributes id="Tomcat2-instance_attributes">
>          <nvpair id="Tomcat2-instance_attributes-tomcat_name"
> name="tomcat_name" value="tomcat"/>
>          <nvpair id="Tomcat2-instance_attributes-statusurl" name="statusurl"
> value="http://localhost:8081/"/>
>          <nvpair id="Tomcat2-instance_attributes-java_home" name="java_home"
> value="/"/>
>          <nvpair id="Tomcat2-instance_attributes-catalina_home"
> name="catalina_home" value="/home/msf/runtime/tomcat2/apache-tomcat-6.0.18"/>
>          <nvpair id="Tomcat2-instance_attributes-client" name="client"
> value="curl"/>
>          <nvpair id="Tomcat2-instance_attributes-testregex" name="testregex"
> value="*</html>"/>
>        </instance_attributes>
>        <operations>
>          <op id="Tomcat2-start-0" interval="0" name="start" timeout="60s"/>
>          <op id="Tomcat2-monitor-50s" interval="50s" name="monitor" timeout="50s"/>
>          <op id="Tomcat2-stop-0" interval="0" name="stop"/>
>        </operations>
>        <meta_attributes id="Tomcat2-meta_attributes">
>          <nvpair id="Tomcat2-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <clone id="ping_clone">
>        <primitive class="ocf" id="ping" provider="pacemaker" type="ping">
>          <instance_attributes id="ping-instance_attributes">
>            <nvpair id="ping-instance_attributes-dampen" name="dampen" value="5s"/>
>            <nvpair id="ping-instance_attributes-multiplier" name="multiplier"
> value="1000"/>
>            <nvpair id="ping-instance_attributes-host_list" name="host_list"
> value="172.21.52.129"/>
>          </instance_attributes>
>          <operations>
>            <op id="ping-monitor-30s" interval="30s" name="monitor"/>
>          </operations>
>          <meta_attributes id="ping-meta_attributes">
>            <nvpair id="ping-meta_attributes-target-role" name="target-role"
> value="Started"/>
>          </meta_attributes>
>        </primitive>
>      </clone>
>      <primitive class="ocf" id="Tomcat2VIP" provider="heartbeat" type="IPaddr3">
>        <instance_attributes id="Tomcat2VIP-instance_attributes">
>          <nvpair id="Tomcat2VIP-instance_attributes-ip" name="ip"
> value="172.21.52.139"/>
>          <nvpair id="Tomcat2VIP-instance_attributes-eth_num" name="eth_num"
> value="eth0:4"/>
>          <nvpair id="Tomcat2VIP-instance_attributes-vip_cleanup_file"
> name="vip_cleanup_file" value="/var/run/bigha.pid"/>
>        </instance_attributes>
>        <operations>
>          <op id="Tomcat2VIP-start-0" interval="0" name="start" timeout="120s"/>
>          <op id="Tomcat2VIP-monitor-30s" interval="30s" name="monitor"/>
>        </operations>
>        <meta_attributes id="Tomcat2VIP-meta_attributes">
>          <nvpair id="Tomcat2VIP-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <primitive class="ocf" id="HttpdVIP" provider="heartbeat" type="IPaddr3">
>        <instance_attributes id="HttpdVIP-instance_attributes">
>          <nvpair id="HttpdVIP-instance_attributes-ip" name="ip"
> value="172.21.52.149"/>
>          <nvpair id="HttpdVIP-instance_attributes-eth_num" name="eth_num"
> value="eth0:4"/>
>          <nvpair id="HttpdVIP-instance_attributes-vip_cleanup_file"
> name="vip_cleanup_file" value="/var/run/bigha.pid"/>
>        </instance_attributes>
>        <operations>
>          <op id="HttpdVIP-start-0" interval="0" name="start" timeout="120s"/>
>          <op id="HttpdVIP-monitor-30s" interval="30s" name="monitor"/>
>        </operations>
>        <meta_attributes id="HttpdVIP-meta_attributes">
>          <nvpair id="HttpdVIP-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <primitive class="ocf" id="Httpd" provider="heartbeat" type="apache">
>        <instance_attributes id="Httpd-instance_attributes">
>          <nvpair id="Httpd-instance_attributes-configfile" name="configfile"
> value="/etc/httpd/conf/httpd.conf"/>
>          <nvpair id="Httpd-instance_attributes-httpd" name="httpd"
> value="/usr/sbin/httpd"/>
>          <nvpair id="Httpd-instance_attributes-client" name="client" value="curl"/>
>          <nvpair id="Httpd-instance_attributes-statusurl" name="statusurl"
> value="http://localhost/img/test.html"/>
>          <nvpair id="Httpd-instance_attributes-testregex" name="testregex"
> value="*</html>"/>
>        </instance_attributes>
>        <operations>
>          <op id="Httpd-start-0" interval="0" name="start" timeout="60s"/>
>          <op id="Httpd-monitor-50s" interval="50s" name="monitor" timeout="50s"/>
>        </operations>
>        <meta_attributes id="Httpd-meta_attributes">
>          <nvpair id="Httpd-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>      <primitive class="ocf" id="MysqlVIP" provider="heartbeat" type="IPaddr3">
>        <instance_attributes id="MysqlVIP-instance_attributes">
>          <nvpair id="MysqlVIP-instance_attributes-ip" name="ip"
> value="172.21.52.150"/>
>          <nvpair id="MysqlVIP-instance_attributes-eth_num" name="eth_num"
> value="eth0:3"/>
>          <nvpair id="MysqlVIP-instance_attributes-vip_cleanup_file"
> name="vip_cleanup_file" value="/var/run/bigha.pid"/>
>        </instance_attributes>
>        <operations>
>          <op id="MysqlVIP-start-0" interval="0" name="start" timeout="120s"/>
>          <op id="MysqlVIP-monitor-30s" interval="30s" name="monitor"/>
>        </operations>
>        <meta_attributes id="MysqlVIP-meta_attributes">
>          <nvpair id="MysqlVIP-meta_attributes-target-role" name="target-role"
> value="Started"/>
>        </meta_attributes>
>      </primitive>
>    </resources>
>    <constraints>
>      <rsc_colocation id="Httpd-with-ip" rsc="HttpdVIP" score="INFINITY"
> with-rsc="Httpd"/>
>      <rsc_order first="MysqlVIP" id="Mysql-after-ip" score="INFINITY"
> then="MS_Mysql"/>
>      <rsc_location id="L_Master" rsc="MS_Mysql">
>        <rule id="L_Master-rule" role="Master" score="100">
>          <expression attribute="#uname" id="L_Master-expression" operation="eq"
> value="cisco-demomsf"/>
>        </rule>
>        <rule id="L_Master-rule1" role="Master" score="100">
>          <expression attribute="#uname" id="L_Master-expression-0"
> operation="eq" value="mysql3"/>
>        </rule>
>      </rsc_location>
>      <rsc_colocation id="Tomcat2-with-Tomcat" rsc="Tomcat2" score="INFINITY"
> with-rsc="Tomcat1"/>
>      <rsc_colocation id="tomcat2-with-ip" rsc="Tomcat2VIP" score="INFINITY"
> with-rsc="Tomcat2"/>
>      <rsc_order first="Tomcat2" id="Httpd-after-Tomcat2" score="INFINITY"
> then="Httpd"/>
>      <rsc_colocation id="Tomcat1-with-ip" rsc="Tomcat1VIP" score="INFINITY"
> with-rsc="Tomcat1"/>
>      <rsc_order first="Tomcat1VIP" id="Tomcat1-after-ip" score="INFINITY"
> then="Tomcat1"/>
>      <rsc_colocation id="Mysql-with-ip" rsc="MysqlVIP" score="INFINITY"
> with-rsc="MS_Mysql" with-rsc-role="Master"/>
>      <rsc_order first="HttpdVIP" id="Httpd-after-op" score="INFINITY"
> then="Httpd"/>
>      <rsc_order first="MS_Mysql" id="Tomcat1-after-MYSQL" score="INFINITY"
> then="Tomcat1VIP"/>
>      <rsc_order first="Tomcat2VIP" id="Tomcat2-after-ip" score="INFINITY"
> then="Tomcat2"/>
>    </constraints>
>  </configuration>
> </cib>
>
>
>
>
>
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list