我是linux网络配置方面的新手
我通过ssh + drbd + nginx为3个节点配置了linux心脏起搏器+cor产c+ stonith。
pcs现状:
3 nodes configured
7 resources configured
Online: [ main-node second-node third-node ]
Full list of resources:
ClusterIP (ocf::heartbeat:IPaddr2): Started main-node
WebSite (ocf::heartbeat:nginx): Started main-node
Master/Slave Set: WebDataClone [WebData]
Masters: [ main-node ]
Slaves: [ second-node third-node ]
WebFS (ocf::heartbeat:Filesystem): Started main-node
ssh-fencing (stonith:ssh): Started third-node
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled我正在测试那些机器中的石碑,只需打开网络上的电缆。它工作得很好,当它再次被插上电源时,石碑正在杀死拔掉的机器。所有其他机器都在处理这个集群。
当我拔掉优先提供WebSite资源的机器时,就会出现问题。那么其他插电机的pcs状态看起来是这样的:
3 nodes configured
7 resources configured
Node main-node: UNCLEAN (offline)
Online: [ second-node third-node ]
Full list of resources:
ClusterIP (ocf::heartbeat:IPaddr2): Started main-node (UNCLEAN)
WebSite (ocf::heartbeat:nginx): Started main-node (UNCLEAN)
Master/Slave Set: WebDataClone [WebData]
WebData (ocf::linbit:drbd): Master main-node (UNCLEAN)
Slaves: [ second-node third-node ]
WebFS (ocf::heartbeat:Filesystem): Started main-node (UNCLEAN)
ssh-fencing (stonith:ssh): Started third-node
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled网站也被关闭了。为什么会这样呢?其他节点不应该提供资源吗?
发布于 2019-07-29 19:19:48
SSH STONITH不是真正的击剑,除非您接受它会让您陷入某些类型的失败,就像您在测试中看到的那样,否则不应该在生产中使用它。
当您拔掉节点的网络电缆时,集群将尝试从集群/网络中消失的节点STONITH。SSH STONITH代理正在使用您拔出的同一网络试图关闭丢失的节点。在恢复网络之前,它无法做到这一点(插入回电)。因为在STONITH代理成功关闭了丢失的节点之前,集群不会采取任何操作(故障转移),所以只剩下不干净(挂起)服务。
如果您在主节点上拔出电源,您将遇到同样的问题,因为当系统没有电源时,您不能将SSH放入系统中。
简而言之,这是使用SSH STONITH时的预期行为,需要适当的围栏设备才能从正在测试的场景中恢复。
https://serverfault.com/questions/977004
复制相似问题