1

Ok so I have gotten fairly far into the configuration successfully, the two nodes have authenticated each other and all is well, but when I try to add the virtual_ip it never starts.

What i've used so far is not really relevant, but my write up (wip) is here, i just don't want to make this post look larger then it needs to be.

To create the virtual interface I have the used the following :

pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.1.218 cidr_netmask=32 op monitor interval=30s

I only have one nic and its config looks like this :

[root@node1 network-scripts]# cat ifcfg-eno16777984
TYPE="Ethernet"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT=no
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME=eth0
UUID="bf0b3de8-f607-42f3-9b00-f22f59292c94"
DEVICE="eno16777984"
ONBOOT="yes"
IPADDR=192.168.1.216
PREFIX=32
GATEWAY=192.168.1.1
DNS1=192.168.1.149

The Error: (found via "pcs status")

* virtual_ip_start_0 on node1 'unknown error' (1): call=12, status=complete, exitreason='Unable to find nic or netmask.',
last-rc-change='Fri Apr 29 02:03:57 2016', queued=1ms, exec=24ms

I don't think its an IPTables problem, as I have it disabled currently along with all other Firewalls. I don't have SELinux disabled. I suspect I need another network config, but im a bit lost what to make the device= and really I am just moving from Ubuntu, so the layout is a bit new, but I love NMTUI!

This looked promising regarding the interface, but I couldn't get it to work and I tried A LOT. Any help is appreciated.

A few other reads I went thru

https://www.centos.org/forums/viewtopic.php?t=50183 https://ihazem.wordpress.com/2011/03/15/adding-virtual-interface-to-centosredhat/

This is the guide I am following :

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Clusters_from_Scratch/index.html#_add_a_resource

As always, if you need more info, I am happy to provide it, thanks in advance!

1
  • 1
    Have you tried to configure the NIC explicit by adding it to the pcs command? pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.1.218 cidr_netmask=32 nic=eno16777984 op monitor interval=30s
    – Thomas
    Apr 29, 2016 at 9:49

3 Answers 3

5

The guide doesn’t have you add nic=eno### to this command, but it failed for me if I didn’t use it. You can find your device number via the following command

cat /etc/sysconfig/network-scripts/ifcfg-e* | grep DEVICE

Mine is eno16777984 so this is my example command.

pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.1.218 cidr_netmask=32 nic=eno16777984 op monitor interval=30s

Make sure it started using the following command:

pcs cluster start --all && sudo pcs status resources
-1

When i used nic with resource creation, it worked:

pcs resource create VirtIP ocf:heartbeat:IPaddr2 ip=10.163.131.6 cidr_netmask=24 nic=eth0:1 op monitor interval=30s

-1

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
3
  • Unfortunately this doesn't answer the question and would be better suited as a comment Sep 22, 2020 at 6:10
  • It does answer the question - how to solve the problem
    – fg78nc
    Sep 22, 2020 at 16:19
  • Ok, good luck on StackExchange. I'm just trying to be honest. Sep 23, 2020 at 1:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .