Bug 1508351 - pcs resource cleanup is overkill in most scenarios
Summary: pcs resource cleanup is overkill in most scenarios
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
Steven J. Levine
Depends On: 1508350
Blocks: 1541161
TreeView+ depends on / blocked
Reported: 2017-11-01 09:46 UTC by Andrew Beekhof
Modified: 2018-08-07 07:58 UTC (History)
9 users (show)

Fixed In Version: pcs-0.9.162-1.el7
Doc Type: Bug Fix
Doc Text:
The "pcs resource cleanup" command no longer generates unnecessary cluster load The "pcs resource cleanup" command cleans the records of failed resource operations that have been resolved. Previously, the command probed all resources on all nodes, generating an unnecessary load on cluster operation. With this fix, the command probes only the resources for which a resource operation failed. The previous functionality of the "pcs resource cleanup" command has been replaced by the new "pcs resource refresh" command, which probes all resources on all nodes. For information on cluster resource cleanup, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/high_availability_add-on_reference/#s1-resource_cleanup-HAAR.
Clone Of: 1508350
: 1541161 (view as bug list)
Last Closed: 2018-04-10 15:40:54 UTC
Target Upstream Version:

Attachments (Terms of Use)
proposed fix (44.97 KB, patch)
2017-11-14 14:51 UTC, Tomas Jelinek
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1220512 0 medium CLOSED pcs resource cleanup improvements 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1612869 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2018:0866 0 None None None 2018-04-10 15:41:46 UTC

Internal Links: 1220512 1612869

Comment 2 Tomas Jelinek 2017-11-14 14:51:14 UTC
Created attachment 1352004 [details]
proposed fix

Test CLI:
* 'pcs resource cleanup' runs 'crm_resource --cleanup'
* 'pcs resource refresh' runs 'crm_resource --refresh'
* the same applies to 'pcs stonith cleanup | refresh'
* see bz1508350 comment 3 for details how to test these
* corresponding capabilities:
  pcs --version --full | tr ' ' "\n" | grep '^pcmk.resource.refresh$'
  pcs --version --full | tr ' ' "\n" | grep '^pcmk.stonith.refresh$'
* corresponding manpage / usage update

Test webUI - a resource detail page:
* for new pcsd: the old "cleanup" button has been replaced by "refresh" and "cleanup" which call corresponding crm_resource functionality
* for old pcsd (not supporting the pcmk.resource.refresh.one-resource capability): the old "cleanup" button has been renamed to "refresh". The point is an old pcsd can only run 'crm_resource --cleanup', which with pacemaker packages from the same release does the same as 'crm_resource --refresh' does now.

Comment 3 Ondrej Mular 2017-11-16 07:09:47 UTC
After fix:
[root@rhel75-node1 ~]# rpm -q pcs

> cli
[root@rhel75-node1 ~]# pcs resource cleanup --debug | grep crm_resource
Running: /usr/sbin/crm_resource --cleanup
Finished running: /usr/sbin/crm_resource --cleanup
[root@rhel75-node1 ~]# pcs resource refresh --debug | grep crm_resource
Running: /usr/sbin/crm_resource --refresh
Finished running: /usr/sbin/crm_resource --refresh
[root@rhel75-node1 ~]# pcs stonith cleanup --debug | grep crm_resource
Running: /usr/sbin/crm_resource --cleanup
Finished running: /usr/sbin/crm_resource --cleanup
[root@rhel75-node1 ~]# pcs stonith refresh --debug | grep crm_resource
Running: /usr/sbin/crm_resource --refresh
Finished running: /usr/sbin/crm_resource --refresh
[root@rhel75-node1 ~]# pcs --version --full | tr ' ' "\n" | grep '^pcmk.resource.refresh$'
[root@rhel75-node1 ~]# pcs --version --full | tr ' ' "\n" | grep '^pcmk.stonith.refresh$'

> web UI
In resource detailed view there are buttons for “Reload” and “Refresh”

Comment 10 Steven J. Levine 2018-02-09 17:43:33 UTC

I did a reworking of the release note writeup -- based in part on the updates to the documentation.  Could you review the release note text?

Comment 11 Tomas Jelinek 2018-02-12 08:31:29 UTC

It looks perfect to me.

Comment 14 errata-xmlrpc 2018-04-10 15:40:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.