I need to set up a VIP with pcs in a 2 CentOS 7 node cluster. The resoruce gets defined like that:
pcs resource create MyVip ocf:heartbeat:IPaddr2 ip=10.215.208.164/24 cidr_netmask=24 nic=ens32 op monitor interval=3s
This same config is working well in all other deployments. I just can't understand what the error means:
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
This is the interface thats seems not found:
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
If you are getting
Check if you have NIC setup for the resource:
pcs config
And check in response whether NIC is defined:
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
You can update nic for an existing resource. Worked for me (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