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

how to change configure item? #256

Closed liangxin1300 closed 1 year ago

liangxin1300 commented 7 years ago

hi @krig: how to change a specific configure item just in crmsh, in an easy and safe way?

e.g I want to change the ring0 bindnetaddr from 10.10.10.0 to 20.20.20.0. Maybe I could use 'crm->corosync->set totem.interface.bindnetaddr "20.20.20.0"'; and then, run 'crm->corosync->push'; or, use 'crm->corosync->edit',change the addr to "20.20.20.0", and run 'crm->corosync->push';

I think it's not a easy/safe way.

User may not know clearly what is "totem.interface.bindnetaddr", or even not know clearly what is corosync.

So, my suggestion is, add an interface "change" in the "crm->cluster" level.

First, "change" is a cluster's action, it's easy to understand and guess; Second, we can use completion to show what items can be changed, such as:

  crm->cluster->change:
       cluster_name interface nodeid ip_version logfile debug expected_votes
  crm->cluster->change->interface:
       0 1(if have)
  crm->cluster->change->interface->0:
       bindnetaddr mcastaddr mcastport

Last, we can wrap the corosync.set and corosync.push function into the change function, to make the changing configure item to be on step

BTW: if above make sense, crm->cluster->rename should replaced by "change->cluster_name"

krig commented 7 years ago

Hmm, I don't know if I agree regarding the user not knowing what corosync is: crmsh is a system administration tool capable of completely destroying multiple critical systems. I think we have to count on any user to at least be aware of the power that they are playing with!

My second problem is that the change idea does not match how crmsh handles changing configuration values in other places: There is configure.set, options.set, resource.param.set.

corosync.set follows that pattern.