The pcs resource cleanup command schedules all resources in a group to start or restart in a Pacemaker cluster
Issue
- I ran
pcs resource cleanup
to clear a failed resource action for a resource that's currently in Started state. The logs said all resources in that resource's group would be started or restarted.
# # RHEL 7.9
# pcs status
...
Resource Group: dummygrp
dummy1 (ocf::heartbeat:Dummy): Started node1
dummy2 (ocf::heartbeat:Dummy): Started node1
Failed Resource Actions:
* dummy1_asyncmon_0 on node1 'unknown error' (1): call=65, status=complete, exitreason='Simulated failure',
last-rc-change='Wed May 26 18:07:09 2021', queued=0ms, exec=0ms
# date && pcs resource cleanup
Wed May 26 18:07:24 PDT 2021
Cleaned up all resources on all nodes
Waiting for 1 reply from the CRMd. OK
May 26 18:07:24 fastvm-rhel-7-6-22 crmd[27338]: notice: State transition S_IDLE -> S_POLICY_ENGINE
May 26 18:07:25 fastvm-rhel-7-6-22 pengine[27337]: notice: * Start dummy1 ( node1 )
May 26 18:07:25 fastvm-rhel-7-6-22 pengine[27337]: notice: * Restart dummy2 ( node1 ) due to required dummy1 start
May 26 18:07:25 fastvm-rhel-7-6-22 pengine[27337]: notice: Calculated transition 19, saving inputs in /var/lib/pacemaker/pengine/pe-input-3458.bz2
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: Initiating monitor operation dummy1_monitor_0 on node1
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: warning: Action 3 (dummy1_monitor_0) on node1 failed (target: 7 vs. rc: 0): Error
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: Transition aborted by operation dummy1_monitor_0 'modify' on node1: Event failed
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: Transition 19 (Complete=2, Pending=0, Fired=0, Skipped=0, Incomplete=8, Source=/var/lib/pacemaker/pengine/pe-input-3458.bz2): Complete
May 26 18:07:25 fastvm-rhel-7-6-22 pengine[27337]: notice: Calculated transition 20, saving inputs in /var/lib/pacemaker/pengine/pe-input-3459.bz2
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: Initiating monitor operation dummy1_monitor_10000 on node1
May 26 18:07:25 fastvm-rhel-7-6-21 crmd[1374]: notice: Result of probe operation for dummy1 on node1: 0 (ok)
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: Transition 20 (Complete=1, Pending=0, Fired=0, Skipped=0, Incomplete=0, Source=/var/lib/pacemaker/pengine/pe-input-3459.bz2): Complete
May 26 18:07:25 fastvm-rhel-7-6-22 crmd[27338]: notice: State transition S_TRANSITION_ENGINE -> S_IDLE
- I ran
pcs resource cleanup
to clear a failed resource action for a resource that's currently in Started state. Dependent resources (e.g., resources later in a group) definitely got restarted.
May 25 16:27:27 cs1 pengine[14322]: notice: Calculated transition 162, saving inputs in /var/lib/pacemaker/pengine/pe-input-57.bz2
May 25 16:27:28 cs1 pengine[14322]: notice: Watchdog will be used via SBD if fencing is required
May 25 16:27:28 cs1 pengine[14322]: notice: On loss of CCM Quorum: Fence all remaining nodes
May 25 16:27:28 cs1 pengine[14322]: notice: * Start VIP ( cs1 )
May 25 16:27:28 cs1 pengine[14322]: notice: * Restart mysql ( cs1 ) due to required VIP start
May 25 16:27:28 cs1 pengine[14322]: notice: Calculated transition 163, saving inputs in /var/lib/pacemaker/pengine/pe-input-58.bz2
May 25 16:27:28 cs1 crmd[14323]: notice: Initiating monitor operation VIP_monitor_0 locally on cs1
May 25 16:27:28 cs1 crmd[14323]: notice: Initiating stop operation mysql_stop_0 locally on cs1
May 25 16:27:28 cs1 crmd[14323]: notice: Result of probe operation for VIP on cs1: 0 (ok)
May 25 16:27:28 cs1 crmd[14323]: warning: Action 13 (VIP_monitor_0) on cs1 failed (target: 7 vs. rc: 0): Error
May 25 16:27:29 cs1 crmd[14323]: notice: Result of stop operation for mysql on cs1: 0 (ok)
...
May 25 16:27:29 cs1 crmd[14323]: notice: Initiating start operation mysql_start_0 locally on cs1
May 25 16:27:30 cs1 crmd[14323]: notice: Result of start operation for mysql on cs1: 0 (ok)
Environment
- Red Hat Enterprise Linux 7 (with the High Availability Add-on)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.