我最近开始研究集群,如果您需要更多信息,请告诉我。
我有一个主动-主动HA群集。它旨在在故障转移场景中工作。
我将Node1和Node2作为双活群集。起搏器和corosync用作集群管理器。两个NODES都有1个资源组,每个资源组3个资源。
当Node1发生故障时,Node2会按预期接管其资源。当Node1重新联机时,pc将首先在node2中停止node1资源,然后在node1中启动它们,这也是预期的并且可以正常工作。
问题:两个节点同时启动时面临问题。
场景:两个节点均关闭电源然后又打开时。假设先启动了Node2,然后PCS看到node1仍处于脱机状态(仍在启动),并在node2中启动了node1资源。然后,它也在node2中启动了自己的资源
因此,在完全启动node1的同时,它会启动自己的资源。这里的问题出在它开始之前,它没有停止节点2中当前已启动的节点1资源(故障转移)。
因此,在结束时,node1的资源在node1中启动,node2的node1和node2资源也都在node2中启动。
上述情况在以时差(15分钟)启动时永远不会发生。当仅重新启动或关闭一个节点时,它也可以正常工作。
# pcs property list --all
Cluster Properties:
batch-limit: 0
cluster-delay: 60s
cluster-infrastructure: cman
cluster-recheck-interval: 15min
crmd-finalization-timeout: 30min
crmd-integration-timeout: 3min
crmd-transition-delay: 0s
dc-deadtime: 20s
dc-version: 1.1.11-97629de
default-action-timeout: 20s
default-resource-stickiness: 0
election-timeout: 2min
enable-startup-probes: true
expected-quorum-votes: 2
is-managed-default: true
last-lrm-refresh: 1565098302
load-threshold: 80%
maintenance-mode: false
migration-limit: -1
no-quorum-policy: ignore
node-action-limit: 0
node-health-green: 0
node-health-red: -INFINITY
node-health-strategy: none
node-health-yellow: 0
pe-error-series-max: -1
pe-input-series-max: 4000
pe-warn-series-max: 5000
placement-strategy: default
remove-after-stop: false
shutdown-escalation: 20min
start-failure-is-fatal: true
startup-fencing: true
stonith-action: reboot
stonith-enabled: false
stonith-timeout: 60s
stop-all-resources: false
stop-orphan-actions: true
stop-orphan-resources: true
symmetric-cluster: false
我能够通过使用pcs 0.9.155版本解决此问题。当同时重启时,较旧的pc版本存在此错误。