Monthly Archives: May 2015

CentOS woes going from 7 to 7.1 on OpenVZ

centosvz

In case you are running CentOS 7 on OpenVZ and you update to 7.1 you might have a nasty surprise if you reboot the container. The ip adresses configured are no longer applied.

More details at https://bugzilla.redhat.com/show_bug.cgi?id=1207975

TL;DR: you need to apply the following patch to ifup-aliases in /etc/sysconfig/network-scripts:

--- ifup-aliases.orig	2015-04-01 08:46:08.179879018 +0200
+++ ifup-aliases	2015-04-01 08:46:52.558427785 +0200
@@ -261,7 +261,8 @@
                is_available ${parent_device} && \
                ( grep -qswi "up" /sys/class/net/${parent_device}/operstate ||  grep -qswi "1" /sys/class/net/${parent_device}/carrier ) ; then
                    echo $"Determining if ip address ${IPADDR} is already in use for device ${parent_device}..."
-				   if ! /sbin/arping -q -c 2 -w ${ARPING_WAIT:-3} -D -I ${parent_device} ${IPADDR} ; then
+				   /sbin/arping -q -c 2 -w ${ARPING_WAIT:-3} -D -I ${parent_device} ${IPADDR}
+				   if [ $? = 1 ]; then
 					   net_log $"Error, some other host already uses address ${IPADDR}."
 					   return 1
 				   fi