为什么在重启带有起搏器和corosync的集群中的主节点后只能看到一个节点?

我在CentOS 7上创build了两个节点:

  • node1:192.168.0.1
  • node2:192.168.0.2

安装了这样的工具:

# yum install -y pacemaker corosync pcs crmsh 

还用HAProxy做负载均衡器。

在我做好所有事情之后,我重新启动node1以testing高可用性。 当node1启动时,从这个方式只能看到一个节点:

 # pcs status corosync 

这可以看到两个节点:

 # crm status 

但另一个是UNCLEAN

 Stack: corosync Current DC: node1 (version 1.1.15-11.el7_3.5-e174ec8) - partition WITHOUT quorum 2 nodes and 0 resources configured Node node2: UNCLEAN (offline) Online: [ node1 ] No resources 

从node2到检查状态,另一个是UNCLEAN

 Stack: corosync Current DC: node2 (version 1.1.15-11.el7_3.5-e174ec8) - partition WITHOUT quorum 2 nodes and 0 resources configured Node node1: UNCLEAN (offline) Online: [ node2 ] No resources 

如何处理?


加成

我做到了这一点:

 # pcs property set stonith-enabled=false 

corosyncconfiguration:

 totem { version: 2 secauth: off cluster_name: lbcluster transport: udpu } nodelist { node { ring0_addr: node1 nodeid: 1 } node { ring0_addr: node2 nodeid: 2 } } quorum { provider: corosync_votequorum two_node: 1 } logging { to_logfile: yes logfile: /var/log/cluster/corosync.log to_syslog: yes } 

让UDP 5404和5405通过防火墙; 这些是Corosync默认希望使用的端口。