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

There is no interface available to remove the properties that have been added #1298

Open liangxin1300 opened 8 months ago

liangxin1300 commented 8 months ago

Have to use crm_attribute like crm_attribute --delete -t crm_config --name stonith-enabled, which is not convenient

liangxin1300 commented 7 months ago

Two solutions:

  1. Reuse crm->configure->delete, now the delete command can only delete the whole block of section, given the section id, such as build-resource-defaults, cib-bootstrap-options, node id and resource id
  2. Add crm->configure->delete_property, it seems reasonable since we already have property and get_property

In anyways, crmsh will call crm_attribute --type <section_type> --name <property_name> --delete command; Since the valid values of --type are: crm_config, rsc_defaults, op_defaults, tickets, we can also delete resource and operation default options

What do you think?

@zzhou1 @nicholasyang2022 @gao-yan

nicholasyang2022 commented 7 months ago

Do we really need a subcommand, which just mirrors the same behavior of crm_attribute --delete? I think crmsh is expected to provide more abstract and higher level interfaces than pacemaker command line utils.