我为fencing创建了一个空的shell脚本,如下面的
#!/bin/bash
echo "success: myfence $2"
exit 0
我已将它添加到cluster.conf中,但是当我在以太网上测试时,我遇到了以下错误。
Feb 10 07:58:36 node2 fenced[2006]: fenced 3.0.12.1 started
Feb 10 07:58:36 node2 fenced[2006]: failed to get dbus connection
Feb 10 08:06:52 node2 fenced[1982]: fenced 3.0.12.1 started
Feb 10 08:06:52 node2 fenced[1982]: failed to get dbus connection
Feb 10 08:11:38 node2 fenced[1928]: fenced 3.0.12.1 started
Feb 10 08:11:38 node2 fenced[1928]: failed to get dbus connection
Feb 10 08:20:07 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:10 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:13 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com failed
它无法正常工作!我的群集在此阶段挂起用于击剑..但是当我运行fence_ack_manual
时它可以工作!
答案 0 :(得分:0)
我自己解决了。在cluster.conf和boom !!!中添加以下行!
<clusternodes>
<clusternode name="CentOS1" nodeid="1" votes="1">
<fence>
<method name="1">
<device nodename="CentOS1" name="myfence"/>
</method>
</fence>
</clusternode>
<clusternode name="CentOS2" nodeid="2" votes="1">
<fence>
<method name="2">
<device nodename="CentOS2" name="myfence"/>
</method>
</fence>
</clusternode>
</clusternodes>