I recently debugged a pretty interesting problem with one of my clusters. When I rebooted one of the nodes, I noticed that a virtual interface that had ONBOOT set to no was started when the network interfaces were initialized. For those not familiar with RHEL systems, the ONBOOT directive tells the network initialization scripts not to start a given interface. This was rather confusing, and after some experimenting with a virtual machine I saw the EXACT same behavior. Something had to be awry here!
After reading through the ifup-aliases script, I saw a reference to the ONPARENT directive. This directive had similar properties to ONBOOT, but only applied to virtual interfaces. A quick Google search revealed that this is indeed the purpose of the directive, though I haven’t seen a whole lot of documentation that refers to it. :(
So if you need to stop a virtual interface from starting when the network interfaces are initialized, you need to set ONPARENT instead of ONBOOT to no. Here is a sample ifcfg file that shows how to use it:
DEVICE=bond0:1 BOOTPROTO=static ONPARENT=no IPADDR=192.168.1.21 NETMASK=255.255.255.0 NETWORK=192.168.1.0
I have no idea why Redhat couldn’t use ONBOOT for both, but then again I don’t understand a lot of things that come out of Raleigh. Food for thought!