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

2011-05-02 Thread Andrew Beekhof
On Wed, Apr 20, 2011 at 9:09 AM, Rakesh K rakirocker4...@gmail.com wrote:
 Andrew Beekhof andrew@... 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=*lt;/htmlgt;/
        /instance_attributes
        operations

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

2011-04-20 Thread Andrew Beekhof
On Tue, Apr 19, 2011 at 12:40 PM, Rakesh K rakirocker4...@gmail.com wrote:
 Andrew Beekhof andrew@... writes:


 There is nothing in this config that requires tomcat2 to be stopped.

 Perhaps:
    colocation Tomcat2-with-Tomcat inf: Tomcat1 Tomcat2VIP
 was intended to be:
    colocation Tomcat2-with-Tomcat inf: Tomcat2 Tomcat1

 The only other service active is httpd, which also has no constraints
 indicating it should stop when mysql is down.


 Thanks Andrew for the valuable feed back.

 As mentioned i had changed the colocation constraint but still facing with the
 same issue.

 As per the order given in HA configuration, i am providing output of my crm
 configure show command

Not enough sorry, I need the status section too.
   crm configure show xml

___
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


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

2011-04-20 Thread Rakesh K
Andrew Beekhof andrew@... writes:

Hi Andrew 

thanks for giving replies
 sorry for troubling you  frequently

here is the out put of crm configure show xml
?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=*lt;/htmlgt;/
/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

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

2011-04-19 Thread Andrew Beekhof
What version of pacemaker?

On Tue, Apr 19, 2011 at 9:10 AM, rakesh k rakirocker4...@gmail.com wrote:
 Hi All

 I had configured Heartbeeat, pacemkaer on my two VM's

 Cluster with two nodes, two nodes are running cent-os as operation systems.

 Cluster configured with 8 resources and defined order, taking reference
 pacemaker explained

 please find the order and co-location constraints, taken from cib.xml

 rsc_colocation id=Httpd-with-ip rsc=HttpdVIP score=INFINITY
 with-rsc=Httpd/
 rsc_colocation id=Tomcat1-with-ip rsc=Tomcat1VIP score=INFINITY
 with-rsc=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=MysqlVIP id=Mysql-after-ip score=INFINITY
 then=MS_Mysql/
 rsc_order first=Tomcat1VIP id=Tomcat1-after-ip score=INFINITY
 then=Tomcat1/
 rsc_order first=MS_Mysql id=Tomcat1-after-MYSQL score=INFINITY
 then=Tomcat1VIP/
 rsc_colocation id=Tomcat2-with-Tomcat rsc=Tomcat1 score=INFINITY
 with-rsc=Tomcat2VIP/
 rsc_order first=Tomcat2VIP id=Tomcat2-after-ip score=INFINITY
 then=Tomcat2/
 rsc_order first=Tomcat2 id=Httpd-after-Tomcat2 score=INFINITY
 then=Httpd/
 rsc_colocation id=tomcat2-with-ip rsc=Tomcat2VIP score=INFINITY
 with-rsc=Tomcat2/

 so when heartbeat start on both nodes, the order resources started are
 MysqlVIP--MSMysql--tomcat1VIP--Tomcat--Tomcat2VIP--tomcat2--HttpdVIP--Httpd

 My question is when i try to stop Mysql process since there is an order
 constraint .all the resources should stop, but still, when i do crm_mon  i
 see tomcat2,tomcat2vip,http,httpdVIP resources running on cluster frame work
 , can you please suggest me if there is any flaw in determining the order or
 co-location constraints.



 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



___
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


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

2011-04-19 Thread Rakesh K
Andrew Beekhof andrew@... writes:


Hi Andrew thanks for giving reply.

The version of pacemaker i am using is pacemaker-1.0.9.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