在一个 Pacemaker 集群中,pcs resource cleanup 命令会调度启动或重启组中的所有资源
Issue
- 我运行了
pcs resource cleanup来清除当前处于 Started 状态的资源中失败的资源操作。日志显示,该资源组中的所有资源将倍启动或重启。
# # 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
- 我运行了
pcs resource cleanup来清除当前处于 Started 状态的资源中失败的资源操作。依赖的资源(例如,组后面的资源)绝对已经重启。
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 (带有 High Availability 附加组件)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.