Mailing List Archive

[crmsh][Question] The order of resources is changed.
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@rh66-01 ~]# crm options sort-elements no
[root@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@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@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@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.

_______________________________________________
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://bugs.clusterlabs.org
Re: [crmsh][Question] The order of resources is changed. [ In reply to ]
Hello,


renayama19661014@ybb.ne.jp writes:

> 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
>
> By new crmsh, does "options sort-elements no" not work?
> Is there the option which does not change order elsewhere?


It is possible that there is a bug in crmsh, I will investigate.

Could you file an issue for this problem at
http://github.com/crmsh/crmsh/issues ? This would help me track the
problem.

Thank you!

--
// Kristoffer Grönlund
// kgronlund@suse.com

_______________________________________________
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://bugs.clusterlabs.org
Re: [crmsh][Question] The order of resources is changed. [ In reply to ]
Hi,

21.01.2015 12:50, Kristoffer Grönlund wrote:
> Hello,
>
>
> renayama19661014@ybb.ne.jp writes:
>
>> 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
>>
>> By new crmsh, does "options sort-elements no" not work?
>> Is there the option which does not change order elsewhere?

I second for this issue as I was just hit by it - pacemaker handles them
in the order the appear in the CIB
(http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_which_resource_is_preferred_to_be_chosen_to_get_assigned_first.html
- "the first runnable resource listed in cib gets allocated first").
Thus it may unnecessarily allocate all globally-unique clone instances
to just one node if other node already has much more resources allocated
due to constraints.

More, I would say that due to how clone/ms resources are presented in
the XML, it would be nice not to put them after all primitive resources
in the crmsh if sorting is disabled.

I would suggest:
...
primitive p1 ...
primitive p2 ...
clone cl-p2 p2 ...
primitive p3 ...
...
instead of the current
...
primitive p1 ...
primitive p2 ...
primitive p3 ...
clone cl-p2 p2 ...
...

It would also be nice to have a way to change existing resource order in
the 'crmsh configure edit/upload'.

Best,
Vladislav

>
>
> It is possible that there is a bug in crmsh, I will investigate.
>
> Could you file an issue for this problem at
> http://github.com/crmsh/crmsh/issues ? This would help me track the
> problem.
>
> Thank you!
>


_______________________________________________
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://bugs.clusterlabs.org
Re: [crmsh][Question] The order of resources is changed. [ In reply to ]
Hi Kristoffer,

> It is possible that there is a bug in crmsh, I will investigate.

> Could you file an issue for this problem at
> http://github.com/crmsh/crmsh/issues ? This would help me track the
> problem.


Okay!

Many Thanks!
Hideo Yamauchi.


----- Original Message -----
> From: Kristoffer Grönlund <kgronlund@suse.com>
> To: renayama19661014@ybb.ne.jp; The Pacemaker cluster resource manager <pacemaker@oss.clusterlabs.org>; PaceMaker-ML <pacemaker@oss.clusterlabs.org>
> Cc:
> Date: 2015/1/21, Wed 18:50
> Subject: Re: [Pacemaker] [crmsh][Question] The order of resources is changed.
>
> Hello,
>
>
> renayama19661014@ybb.ne.jp writes:
>
>> 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
>>
>> By new crmsh, does "options sort-elements no" not work?
>> Is there the option which does not change order elsewhere?
>
>
> It is possible that there is a bug in crmsh, I will investigate.
>
> Could you file an issue for this problem at
> http://github.com/crmsh/crmsh/issues ? This would help me track the
> problem.
>
> Thank you!
>
> --
> // Kristoffer Grönlund
> // kgronlund@suse.com
>

_______________________________________________
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://bugs.clusterlabs.org