[Pacemaker] Error while performing crm attribute operation. and cl_status commands

Andrew Beekhof andrew at beekhof.net
Sun Jun 26 23:31:43 UTC 2011


On Tue, May 17, 2011 at 2:48 AM, Rakesh K <rakirocker4236 at gmail.com> wrote:
>
>
> Hi All
>
> I had configured Mysql as multi-state resource in HA
>
> I had configured HA cluster consisting of two nodes and one Mysql multistate
> resource
>
>
> crm_attribute --type rsc_location --node mysql2 --get-value score
> non-option ARGV-elements: score
> scope=rsc_location   value=(null)
> Error performing operation: cib object missing

Its best if you don't make up cli options:

   man crm_attribute

> While executing the above command i am getting an error, how to get the score
> value and status of the node from cib.xml,
>
> 1) I had stopped HA process on node 1 and tried executing
> the command
> cl_status nodestatus mysql3
>
> if i start HA process on node2 also still i am getting status as active for
> while, if i try executing the same command after a while stopping HA process i
> am getting an output status value as dead.
>
> Ho can we get the dead status of a node from cib.xml, once we stop the HA
> process on node-1
>
> please find the cib.xml for the above HA configuration
>
> <cib validate-with="pacemaker-1.0" crm_feature_set="3.0.1" have-quorum="1"
> admin_epoch="0" epoch="1751" dc-uuid="87b8b88e-3ded-4e34-8708-46f7afe62935"
> num_updates="20" cib-last-written="Mon May 16 06:54:24 2011">
>  <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>
>    <nodes>
>      <node id="87b8b88e-3ded-4e34-8708-46f7afe62935" type="normal" uname="mysql3"/>
>      <node id="6317f856-e57b-4a03-acf1-ca81af4f19ce" type="normal"
> uname="cisco-demomsf">
>        <instance_attributes id="nodes-6317f856-e57b-4a03-acf1-ca81af4f19ce">
>          <nvpair id="nodes-6317f856-e57b-4a03-acf1-ca81af4f19ce-standby"
> name="standby" value="false"/>
>          <nvpair id="nodes-6317f856-e57b-4a03-acf1-ca81af4f19ce-kernel"
> name="kernel" value="2.6.22.10-vs2.2.0.5-cisco"/>
>        </instance_attributes>
>      </node>
>    </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="Started"/>
>        </meta_attributes>
>        <primitive class="ocf" id="Mysql" provider="msf" 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"/>
>            <nvpair id="Mysql-instance_attributes-node_list" name="node_list"
> value="mysql3 cisco-demomsf"/>
>            <nvpair id="Mysql-instance_attributes-scoresChange_script"
> name="scoresChange_script" value="/usr/lib/ocf/resource.d/msf/scoresChange"/>
>          </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>
>    </resources>
>    <constraints>
>      <rsc_location id="L_Master" rsc="MS_Mysql">
>        <rule id="L_Master-rule1" role="Master" score="INFINITY">
>          <expression attribute="#uname" id="L_Master-expression" operation="eq"
> value="mysql3"/>
>        </rule>
>        <rule id="L_Master-rule2" role="Master" score="100">
>          <expression attribute="#uname" id="L_Master-expression-0"
> operation="eq" value="cisco-demomsf"/>
>        </rule>
>      </rsc_location>
>    </constraints>
>    <rsc_defaults>
>      <meta_attributes id="rsc-options">
>        <nvpair id="rsc-options-resource-stickiness" name="resource-stickiness"
> value="100"/>
>      </meta_attributes>
>    </rsc_defaults>
>    <op_defaults/>
>  </configuration>
>  <status>
>    <node_state uname="mysql3" ha="active" in_ccm="true" crmd="online"
> shutdown="0" join="member" expected="member"
> id="87b8b88e-3ded-4e34-8708-46f7afe62935" crm-debug-origin="do_update_resource">
>      <transient_attributes id="87b8b88e-3ded-4e34-8708-46f7afe62935">
>        <instance_attributes id="status-87b8b88e-3ded-4e34-8708-46f7afe62935">
>          <nvpair
> id="status-87b8b88e-3ded-4e34-8708-46f7afe62935-probe_complete"
> name="probe_complete" value="true"/>
>          <nvpair name="master-Mysql:0"
> id="status-87b8b88e-3ded-4e34-8708-46f7afe62935-master-Mysql:0" value="3601"/>
>        </instance_attributes>
>      </transient_attributes>
>      <lrm id="87b8b88e-3ded-4e34-8708-46f7afe62935">
>        <lrm_resources>
>          <lrm_resource id="Mysql:0" type="mysql" class="ocf" provider="msf">
>            <lrm_rsc_op id="Mysql:0_monitor_0" operation="monitor"
> crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
> transition-key="5:16:7:83913f89-aeeb-479c-87c0-b4eb3d40e1c9"
> transition-magic="0:7;5:16:7:83913f89-aeeb-479c-87c0-b4eb3d40e1c9" call-id="2"
> rc-code="7" op-status="0" interval="0" last-run="1305551127"
> last-rc-change="1305551127" exec-time="30" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:0_start_0" operation="start"
> crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
> transition-key="7:16:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9"
> transition-magic="0:0;7:16:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9" call-id="3"
> rc-code="0" op-status="0" interval="0" last-run="1305551129"
> last-rc-change="1305551129" exec-time="4290" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:0_promote_0" operation="promote"
> crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
> transition-key="8:23:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9"
> transition-magic="0:0;8:23:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9" call-id="11"
> rc-code="0" op-status="0" interval="0" last-run="1305554039"
> last-rc-change="1305554039" exec-time="70" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:0_post_notify_promote_0" operation="notify"
> crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
> transition-key="46:23:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9"
> transition-magic="0:0;46:23:0:83913f89-aeeb-479c-87c0-b4eb3d40e1c9" call-id="12"
> rc-code="0" op-status="0" interval="0" last-run="1305554040"
> last-rc-change="1305554040" exec-time="40" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:0_monitor_10000" operation="monitor"
> crm-debug-origin="build_active_RAs" crm_feature_set="3.0.1"
> transition-key="8:1:8:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:8;8:1:8:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="13"
> rc-code="8" op-status="0" interval="10000" last-run="1305554261"
> last-rc-change="1305554061" exec-time="70" queue-time="0"
> op-digest="50731eaf629e396bdae5cf09e11caaa8"/>
>            <lrm_rsc_op id="Mysql:0_pre_notify_start_0" operation="notify"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="42:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:0;42:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="14"
> rc-code="0" op-status="0" interval="0" last-run="1305554271"
> last-rc-change="1305554271" exec-time="30" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:0_post_notify_start_0" operation="notify"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="43:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:0;43:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="15"
> rc-code="0" op-status="0" interval="0" last-run="1305554278"
> last-rc-change="1305554278" exec-time="30" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>          </lrm_resource>
>        </lrm_resources>
>      </lrm>
>    </node_state>
>    <node_state uname="cisco-demomsf" ha="active" in_ccm="true" crmd="online"
> join="member" shutdown="0" expected="member"
> id="6317f856-e57b-4a03-acf1-ca81af4f19ce" crm-debug-origin="do_update_resource">
>      <lrm id="6317f856-e57b-4a03-acf1-ca81af4f19ce">
>        <lrm_resources>
>          <lrm_resource id="Mysql:1" type="mysql" class="ocf" provider="msf">
>            <lrm_rsc_op id="Mysql:1_monitor_0" operation="monitor"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="6:4:7:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:7;6:4:7:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="2"
> rc-code="7" op-status="0" interval="0" last-run="1305554272"
> last-rc-change="1305554272" exec-time="30" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:1_start_0" operation="start"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="11:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:0;11:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="3"
> rc-code="0" op-status="0" interval="0" last-run="1305554273"
> last-rc-change="1305554273" exec-time="4220" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:1_post_notify_start_0" operation="notify"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="44:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:0;44:4:0:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="4"
> rc-code="0" op-status="0" interval="0" last-run="1305554279"
> last-rc-change="1305554279" exec-time="30" queue-time="0"
> op-digest="bc00bd369dcd27db0cc9d261cb0c01c0"/>
>            <lrm_rsc_op id="Mysql:1_monitor_12000" operation="monitor"
> crm-debug-origin="do_update_resource" crm_feature_set="3.0.1"
> transition-key="13:5:0:72f8da29-896b-4ebe-a6a6-36c7666fd428"
> transition-magic="0:0;13:5:0:72f8da29-896b-4ebe-a6a6-36c7666fd428" call-id="5"
> rc-code="0" op-status="0" interval="12000" last-run="1305554281"
> last-rc-change="1305554281" exec-time="40" queue-time="0"
> op-digest="50731eaf629e396bdae5cf09e11caaa8"/>
>          </lrm_resource>
>        </lrm_resources>
>      </lrm>
>      <transient_attributes id="6317f856-e57b-4a03-acf1-ca81af4f19ce">
>        <instance_attributes id="status-6317f856-e57b-4a03-acf1-ca81af4f19ce">
>          <nvpair
> id="status-6317f856-e57b-4a03-acf1-ca81af4f19ce-probe_complete"
> name="probe_complete" value="true"/>
>          <nvpair
> id="status-6317f856-e57b-4a03-acf1-ca81af4f19ce-master-Mysql:1"
> name="master-Mysql:1" value="1"/>
>        </instance_attributes>
>      </transient_attributes>
>    </node_state>
>  </status>
> </cib>
>
>
> Regards
> Rakes
>
>
> _______________________________________________
> 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