我正在遵循http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_从…_刮伤/_验证_交槽_installation.html文档来在AWS中设置一个2节点集群。这两个节点安装了起搏器,并启用了FW规则。当我在两个节点上运行pcs状态命令时,我会得到另一个节点不干净(脱机)的消息。
我已经设置的两个节点是ha1p和ha2p。
上
[root@ha1 log]# pcs status
Cluster name: mycluster
WARNING: no stonith devices and stonith-enabled is not false
Last updated: Wed Dec 24 21:30:44 2014
Last change: Wed Dec 24 21:27:44 2014
Stack: cman
Current DC: ha1p - partition with quorum
Version: 1.1.11-97629de
2 Nodes configured
0 Resources configured
Node ha2p: UNCLEAN (offline)
Online: [ ha1p ]
Full list of resources:上
[root@ha2 log]# pcs status
Cluster name: mycluster
WARNING: no stonith devices and stonith-enabled is not false
Last updated: Wed Dec 24 21:30:44 2014
Last change: Wed Dec 24 21:27:44 2014
Stack: cman
Current DC: ha2p - partition with quorum
Version: 1.1.11-97629de
2 Nodes configured
0 Resources configured
Node ha1p: UNCLEAN (offline)
Online: [ ha2p ]
Full list of resources:/etc/cluster.conf的内容如下:
根@ha1日志# cat /etc/cluster.conf
<cluster config_version="9" name="mycluster">
<fence_daemon/>
<clusternodes>
<clusternode name="ha1p" nodeid="1">
<fence>
<method name="pcmk-method">
<device name="pcmk-redirect" port="ha1p"/>
</method>
</fence>
</clusternode>
<clusternode name="ha2p" nodeid="2">
<fence>
<method name="pcmk-method">
<device name="pcmk-redirect" port="ha2p"/>
</method>
</fence>
</clusternode>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
<fencedevices>
<fencedevice agent="fence_pcmk" name="pcmk-redirect"/>
</fencedevices>
<rm>
<failoverdomains/>
<resources/>
</rm>
</cluster>任何帮助都将不胜感激。
发布于 2018-01-03 01:03:30
是的,您需要确保在集群定义中使用的主机名不是/etc/host中127.0.0.1行中的主机名。
所以,我的/etc/hosts是这样的:
127.0.0.1 cluster-node1 domain.com localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.1 node1
192.168.0.2 node2发布于 2014-12-24 22:48:43
这是因为您的集群没有完整的底层配置,处于不干净的状态意味着集群不知道节点的状态。
发布于 2017-11-09 03:55:31
也许您可以编辑/etc/host文件,删除包含127.0.0.1和:1(提到localhost的行)的行。我有这个精确的问题,我尝试用这个方法,并解决了这个问题。
https://serverfault.com/questions/656374
复制相似问题