首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >起搏器结不干净(离线)

起搏器结不干净(离线)
EN

Server Fault用户
提问于 2014-12-24 21:52:47
回答 5查看 40.6K关注 0票数 7

我正在遵循http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_从…_刮伤/_验证_交槽_installation.html文档来在AWS中设置一个2节点集群。这两个节点安装了起搏器,并启用了FW规则。当我在两个节点上运行pcs状态命令时,我会得到另一个节点不干净(脱机)的消息。

我已经设置的两个节点是ha1p和ha2p。

输出在ha1p

代码语言:javascript
复制
[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:

输出在ha2p

代码语言:javascript
复制
[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

代码语言:javascript
复制
<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>

任何帮助都将不胜感激。

EN

回答 5

Server Fault用户

发布于 2018-01-03 01:03:30

是的,您需要确保在集群定义中使用的主机名不是/etc/host中127.0.0.1行中的主机名。

所以,我的/etc/hosts是这样的:

代码语言:javascript
复制
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
票数 4
EN

Server Fault用户

发布于 2014-12-24 22:48:43

这是因为您的集群没有完整的底层配置,处于不干净的状态意味着集群不知道节点的状态。

票数 2
EN

Server Fault用户

发布于 2017-11-09 03:55:31

也许您可以编辑/etc/host文件,删除包含127.0.0.1和:1(提到localhost的行)的行。我有这个精确的问题,我尝试用这个方法,并解决了这个问题。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/656374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档