[Linux-HA] How to reorder resources in a group?

Yan Fitterer yan at fitterer.org
Thu Sep 13 03:46:59 MDT 2007


>> I'd like to reorder the primitives in that group:
>> Resource Group: web
>>     resource_web_ip     (heartbeat::ocf:IPaddr2)
>>     resource_web_ip_27  (heartbeat::ocf:IPaddr2)
>>     resource_web_fs_ww  (heartbeat::ocf:Filesystem)
>>     resource_web_fs_cache       (heartbeat::ocf:Filesystem)
>>     resource_web_apache (heartbeat::ocf:apache)
>>     resource_web_indexserver    (heartbeat:indexserver)
>>     resource_web_samba  (heartbeat:samba)
>>     resource_web_mailto (heartbeat::ocf:MailTo)
>>
>> Reordering via GUI doesn't work (klicking up/down arrows just doesn't
>> change the order of resources).
>>
>> What I've tried:
>> * cibadmin -Q -o resources > web.xml
>> * edit web.xml to contain just the web group, reordered as above
>> * cibadmin -R -o resources -x web.xml
> 
> this is the one you want, however you need to run it on every node (i
> realize this is likely to be frustrating)
> 
> this is because of a limitation in the way we broadcast changes which
> doesn't preserve the ordering.
> 
>> * cibadmin -U -o resources -x web.xml
>> * cibadmin -M -o resources -x web.xml
>> All three don't return any errors -  but they also don't produce the
>> expected result.
>>
>> * cibadmin -D -X '<group ordered="true" collocated="true" id="web">'
>> * cibadmin -C -o resources -x web.xml
>>
>> To first completely delete and then recreate the group actually work -
>> but it sure seems strance if deleting and recreating the group is
>> actually required.

Supposedly, this would negate the need to update on each node.

On a running cluster, to avoid restarts, you could first put resources 
in unmanaged mode, then delete/recreate, then move back to managed.

Not sure it's any less hassle than updating on each node. In addition, 
if you have multiple groups, and you care which order the groups appear 
on, this will not work. I think when creating it will append the group 
at the bottom of the list :(

As somebody said before ;) we need better management tools ...

Yan



More information about the Linux-HA mailing list