ClusterLabs / crmsh

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

Don't sort elements at all unless sort_elements is true #78

Open krig opened 9 years ago

krig commented 9 years ago

The order of elements in the CIB is significant, so don't do any reordering unless instructed to.

crmsh should also allow edits to the CIB that are reorderings of elements only.

dmuhamedagic commented 9 years ago

On Wed, Jan 21, 2015 at 09:06:18AM -0800, Kristoffer Grönlund wrote:

The order of elements in the CIB is significant,

It's not really, unless it's primitives in a group. Or did you mean something else.

so don't do any reordering unless instructed to.

The NTT once requested to keep elements in the same order as entered, hence the sort-elements option.

crmsh should also allow edits to the CIB that are reorderings of elements only.

I wonder how to implement that :)

krig commented 9 years ago

It seems to be significant in general, citing a mail to the pacemaker mailing list by @bubble666 :

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'.

krig commented 9 years ago

Yes, the second part may be tricky to implement.. but if the first assumption is true, the second becomes necessary. :/

dmuhamedagic commented 9 years ago

On Wed, Jan 21, 2015 at 09:43:47AM -0800, Kristoffer Grönlund wrote:

It seems to be significant in general, citing a mail to the pacemaker mailing list by @bubble666 :

OK. Didn't think that the placement could be influenced like that. Hmm, sorting then may be out of vogue ;-) Or we need a different sort order.