我需要在2个CentOS 7节点集群中用PC设置VIP。资源定义如下:
pcs resource create MyVip ocf:heartbeat:IPaddr2 ip=10.215.208.164/24 cidr_netmask=24 nic=ens32 op monitor interval=3s
此配置在所有其他部署中均正常运行。我只是不明白错误是什么意思:
Failed Actions:
* MyVip_start_0 on node02 'not configured' (6): call=6, status=complete, exitreason='[findif] failed',
last-rc-change='Fri Dec 28 20:47:26 2018', queued=0ms, exec=58ms
这似乎找不到接口:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:50:56:92:e2:f9 brd ff:ff:ff:ff:ff:ff
inet 10.215.208.173/24 brd 10.215.208.255 scope global noprefixroute ens32
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe92:e2f9/64 scope link
valid_lft forever preferred_lft forever
答案 0 :(得分:0)
pcs资源创建MyVip ocf:heartbeat:IPaddr2 ip = 10.215.208.164 / 24 cidr_netmask = 24 nic = ens32运营商监控间隔= 3s
ip没有cidr掩码。
正确的定义将为::
ocf:heartbeat:IPaddr2 ip = 10.215.208.164 cidr_netmask = 24 nic = ens32运营商监控间隔= 3s
答案 1 :(得分:0)
使用命令获得此错误消息
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=1.2.3.4 cidr_netmask=32 op monitor interval=30s
我猜脚本findif
尝试为给定ip查找具有适当网络地址的接口。我没有任何相似之处,因此从我的接口子网中指定IP即可解决问题:
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=192.168.243.123 cidr_netmask=32 op monitor interval=30s
手动指定界面也可以解决问题:
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=1.2.3.4 cidr_netmask=32 nic=lo op monitor interval=30s
答案 2 :(得分:0)
如果您得到
检查是否为资源设置了NIC:
pcs config
然后检查是否定义了NIC:
Cluster Name: VIP
Corosync Nodes:
serv1.centos7g.com serv2.XXX.com
Pacemaker Nodes:
serv1.centos7g.com serv2.XXX.com
Resources:
Resource: vip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: cidr_netmask=24 ip=192.168.119.200 nic=YOUR_NIC_HERE
您可以为现有资源更新nic。为我工作(CentOS 7.2)
pcs resource update RESOURCE_NAME nic=NIC_NAME
pcs resource cleanup
# check if IP address was created on your NIC interface
ip a s
pcs status