Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-61901

"pcs resource delete" overhaul [rhel-9]

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.6
    • None
    • pcs
    • pcs-0.11.8-2.el9
    • None
    • rhel-sst-high-availability
    • 13
    • 19
    • 5
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Enhancement
    • Hide
      .Deleting multiple resources with a single `pcs` command

      Before this update, the `pcs resource delete`, the `pcs resource remove`, the `pcs stonith delete` and the `pcs stonith remove` commands supported the removal of only one resource at a time. With this update, you can now delete multiple resources at once with a single command.
      Show
      .Deleting multiple resources with a single `pcs` command Before this update, the `pcs resource delete`, the `pcs resource remove`, the `pcs stonith delete` and the `pcs stonith remove` commands supported the removal of only one resource at a time. With this update, you can now delete multiple resources at once with a single command.
    • Done
    • None

      This is a clone of issue RHEL-61889 to use for version rhel-9.6

      Original description:
      1) When deleting a resource group, pcs lists all resources in the group and deletes them one by one. For each resource the CIB is loaded, the resource is deleted, and the CIB is pushed. If anything goes wrong in the process, we may end up with part the resources deleted and the other part still present in the cluster.

      2) It is not possible to delete more than one resource in one go. So if the user wants to delete five resources, they need to run "pcs resource delete" five times. Pcs will five times load the CIB, stop the resource, push the CIB, wait for pacemaker to stop the resource, load the CIB, delete the resource and push the CIB. That will unnecessary take a lot of time.

      We want to make the code modular and reusable, allow multiple resources to be deleted with one command, fix the command line arguments parsing, improve error reporting.

      Once pcs part is done, we need to update pcsd so it does not use -f when deleting resources.

      Also we should deal with deleting remove and guest nodes. Currently the resource delete command removes the node from pacemaker by using crm_node --remove, but does not delete config files and stop and disable pacemaker remote on the deleted node. It would be probably better to either do none of that or all of that.

              mmazoure Michal Mazourek
              watson-automation Watson Automation
              Peter Romancik Peter Romancik
              Michal Mazourek Michal Mazourek
              Steven Levine Steven Levine
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: