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

2011-05-16 Thread Rakesh K


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

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 

Re: [Pacemaker] [pacemaker] Error while executing crm_attribute command from command line

2011-05-16 Thread Rakesh K
Andrew Beekhof andrew@... writes:

 
 # CIB_file=./cib.xml crm_attribute -N mysql3 -n master-Mysql:0 -l
 forever -v 3 -V
 crm_attribute[23703]: 2011/05/10_08:42:59 info: Invoked: crm_attribute
 -N mysql3 -n master-Mysql:0 -l forever -v 3 -V
 crm_attribute[23703]: 2011/05/10_08:42:59 ERROR: Type ID doesn't allow
 value 'nodes-87b8b88e-3ded-4e34-8708-46f7afe62935-master-Mysql:0'
 
 So no colons allowed I'm afraid.
 
Hi andrew 

Thank you very much for replying back

the colons are created by the HA itself

  
  nvpair name=master-Mysql:0
id=status-87b8b88e-3ded-4e34-8708-46f7afe62935-master-Mysql:0 value=3601/
 

  nvpair
id=status-6317f856-e57b-4a03-acf1-ca81af4f19ce-master-Mysql:1
name=master-Mysql:1 value=1/
  
Regards
Rakesh



___
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker