我已经为围栏创建了一个空的 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
它时它可以工作!