[Pacemaker] [crmsh][Question] The order of resources is changed.

renayama19661014 at ybb.ne.jp renayama19661014 at ybb.ne.jp
Wed Jan 21 08:25:50 UTC 2015


Hi All,

We confirmed a function of crmsh by the next combination.
 * corosync-2.3.4
 * pacemaker-Pacemaker-1.1.12
 * crmsh-2.1.0

We prepared the following cli file.
---------------------------------------
### Cluster Option ###
property no-quorum-policy="ignore" \
stonith-enabled="true" \
startup-fencing="false"

### Resource Defaults ###
rsc_defaults resource-stickiness="INFINITY" \
migration-threshold="1"

### Group Configuration ###
group grpPostgreSQLDB \
prmExPostgreSQLDB \
prmApPostgreSQLDB

### Group Configuration ###
group grpStonith1 \
prmStonith1-2

group grpStonith2 \
prmStonith2-2

### Fencing Topology ###
fencing_topology \
rh66-01: prmStonith1-2 \
rh66-02: prmStonith2-2

### Primitive Configuration ###
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"

### Resource Location ###
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-01 ~]# crm options sort-elements no
[root at rh66-01 ~]# 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-01 ~]# 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-01 ~]# 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-heartbeat1 ~]# 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.




More information about the Pacemaker mailing list