在给pacemaker添加ipv6类型的resource agent的时候发生错误,错误信息如下:
Failed actions:
ipv6-vip-master_start_0 on node2 'unknown error' (1): call=542, status=complete, exit-reason='[findif] failed', last-rc-change='Tue Mar 29 17:12:33 2016', queued=0ms, exec=72ms
从错误信息可以看出出错原因是findif failed,意思是无法找到所加ip对应的网卡,于是检查自己的网卡信息,在我的服务器上,ipv6所在网卡为ens9:
# ifconfig ens9
ens9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 1920:1680:2460:ffff:1920:1680:2460:fff2 prefixlen 64 scopeid 0x0<global>
inet6 fe80::5054:ff:fe6b:9f19 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:6b:9f:19 txqueuelen 1000 (Ethernet)
RX packets 8231 bytes 559378 (546.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19 bytes 1754 (1.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
而在我的resource create指令中ip设为了1920:1680:2460:ffff:1920:1680:2460:fff5,cidr_netmask设为了112,与网卡中的prefixlen 64不匹配,所以pacemaker无法找到该ip对应的网卡,发生错误。将112修改为64即可正常添加。