Bug 1508351

Summary: pcs resource cleanup is overkill in most scenarios
Product: Red Hat Enterprise Linux 7 Reporter: Andrew Beekhof <abeekhof>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact: Steven J. Levine <slevine>
Priority: high    
Version: 7.4CC: abeekhof, cfeist, cluster-maint, cluster-qe, idevat, kgaillot, omular, rsteiger, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: 1508350
: 1541161 (view as bug list) Environment:
Last Closed: 2018-04-10 15:40:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1508350    
Bug Blocks: 1541161    
Attachments:
Description Flags
proposed fix none

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
pcs-0.9.162-1.el7.x86_64

> 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$'
pcmk.resource.refresh
[root@rhel75-node1 ~]# pcs --version --full | tr ' ' "\n" | grep '^pcmk.stonith.refresh$'
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
Tomas:

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
Steven:

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.

https://access.redhat.com/errata/RHBA-2018:0866