ClusterLabs / crmsh

Command-line interface for High-Availability cluster management on GNU/Linux systems.
GNU General Public License v2.0
131 stars 94 forks source link

The order of resources is changed. #79

Closed HideoYamauchi closed 9 years ago

HideoYamauchi commented 9 years ago

We confirmed a function of crmsh by the next combination.

We prepared the following cli file.


 property no-quorum-policy="ignore" \ 
 stonith-enabled="true" \ 
 startup-fencing="false" 

 rsc_defaults resource-stickiness="INFINITY" \ 
 migration-threshold="1" 

 group grpPostgreSQLDB \ 
 prmExPostgreSQLDB \ 
 prmApPostgreSQLDB 

 group grpStonith1 \ 
 prmStonith1-2 

 group grpStonith2 \ 
 prmStonith2-2 

 fencing_topology \ 
 rh66-01: prmStonith1-2 \ 
 rh66-02: prmStonith2-2 

 primitive prmExPostgreSQLDB ocf:heartbeat:Dummy \ 
 op start interval="0s" timeout="90s" on-fail="restart" \ 
 op monitor interval="10s" timeout="60s" on-fail="restart" \ 
 op stop interval="0s" timeout="60s" on-fail="fence" 

 primitive prmApPostgreSQLDB ocf:heartbeat:Dummy \ 
 op start interval="0s" timeout="300s" on-fail="restart" \ 
 op monitor interval="10s" timeout="60s" on-fail="restart" \ 
 op stop interval="0s" timeout="300s" on-fail="fence" 

 primitive prmStonith1-2 stonith:external/ssh \ 
 params \ 
 hostlist="rh66-01" \ 
 op start interval="0s" timeout="60s" on-fail="restart" \ 
 op monitor interval="3600s" timeout="60s" on-fail="restart" \ 
 op stop interval="0s" timeout="60s" on-fail="ignore" 

 primitive prmStonith2-2 stonith:external/ssh \ 
 params \ 
 hostlist="rh66-02" \ 
 op start interval="0s" timeout="60s" on-fail="restart" \ 
 op monitor interval="3600s" timeout="60s" on-fail="restart" \ 
 op stop interval="0s" timeout="60s" on-fail="ignore" 

 location rsc_location-grpPostgreSQLDB-1 grpPostgreSQLDB \ 
 rule 200: #uname eq rh66-01 \ 
 rule 100: #uname eq rh66-02 
 location rsc_location-grpStonith1-2 grpStonith1 \ 
 rule -INFINITY: #uname eq rh66-01 
 location rsc_location-grpStonith2-3 grpStonith2 \ 
 rule -INFINITY: #uname eq rh66-02 

We set "sort-elements no" and read cli file in crm.


 [root [at] rh66-0 ~]# crm options sort-elements no 
 [root [at] rh66-0 ~]# cat .config/crm/crm.conf 
 [core] 
 sort_elements = no 

We thought that a resource was sent to pacemaker in order of cli file.


 [root [at] rh66-0 ~]# crm configure load update trac2980.crm 

However, the order of resources seems to be changed by crm. (We thought that grpPostgreSQLDB was displayed by the top.)


 [root [at] rh66-0 ~]# crm_mon -1 -Af 
 Last updated: Thu Jan 22 02:02:15 2015 
 Last change: Thu Jan 22 02:01:59 2015 
 Stack: corosync 
 Current DC: rh66-01 (3232256178) - partition with quorum 
 Version: 1.1.12-561c4cf 
 2 Nodes configured 
 4 Resources configured 

 Online: [ rh66-01 rh66-02 ] 

 Resource Group: grpStonith2 
   prmStonith2-2   (stonith:external/ssh): Started rh66-01 
 Resource Group: grpStonith1 
   prmStonith1-2   (stonith:external/ssh): Started rh66-02 
 Resource Group: grpPostgreSQLDB 
   prmExPostgreSQLDB (ocf::heartbeat:Dummy): Started rh66-01 
   prmApPostgreSQLDB (ocf::heartbeat:Dummy): Started rh66-01 

We sent similar cli file in environment of pacemaker1.0, but the order of resources was not changed by crm. (The grpPostgreSQLDB is displayed by the top.)


 [root [at] rh64-heartbeat ~]# crm_mon -1 -Af 
 ============ 
 Last updated: Wed Jan 21 15:12:08 2015 
 Stack: Heartbeat 
 Current DC: rh64-heartbeat2 (eac5dbcb-78ae-4450-8d44-b8175e5638dd) - partition with quorum  
 Version: 1.0.13-9227e89 
 2 Nodes configured, unknown expected votes 
 6 Resources configured. 
 ============ 

Online: [ rh64-heartbeat1 rh64-heartbeat2 ] 

Resource Group: grpPostgreSQLDB 
  prmExPostgreSQLDB (ocf::heartbeat:Dummy): Started rh64-heartbeat1 
  prmFsPostgreSQLDB1 (ocf::heartbeat:Dummy): Started rh64-heartbeat1 
  prmIpPostgreSQLDB (ocf::heartbeat:Dummy): Started rh64-heartbeat1 
  prmApPostgreSQLDB (ocf::heartbeat:Dummy): Started rh64-heartbeat1 
Resource Group: grpStonith1 
  prmStonith1-1   (stonith:external/ssh): Started rh64-heartbeat2 
  prmStonith1-2   (stonith:external/ssh): Started rh64-heartbeat2 
Resource Group: grpStonith2 
  prmStonith2-1   (stonith:external/ssh): Started rh64-heartbeat1 
  prmStonith2-2   (stonith:external/ssh): Started rh64-heartbeat1 

By new crmsh, does "options sort-elements no" not work? Is there the option which does not change order elsewhere?

Best Regards, Hideo Yamauchi.

krig commented 9 years ago

Related issue: #78

krig commented 9 years ago

Could you please re-test this with the current crmsh master? The proposed fix for #78 ought to fix this, I hope. Thanks!

krig commented 9 years ago

The current fix is not good, no need to test. Apologies.

HideoYamauchi commented 9 years ago

Okay! I wait for your correction to be completed.

krig commented 9 years ago

Hello again, please test with the current version. I have found and fixed a couple of reordering bugs in crmsh which I suspect was the cause of the problems.

HideoYamauchi commented 9 years ago

Okay! I test it on tomorrow or Monday.

Many Thanks!

krig commented 9 years ago

Thank you!

HideoYamauchi commented 9 years ago

In the version that you just revised, I confirmed movement. Your correction worked definitely.

Cheers, Hideo Yamauchi.

krig commented 9 years ago

Thank you!