One of our dedicated servers, which is CentOS 6 based crashed today after I wanted to restart the network interface. Simply after running the following command
service network restart
The box has crashed and I had to reboot it. After server comes up, I have checked the logs to see what was wrong on the server. I have found it.
There is a new and current bug which might be solved on CentOS 7, but not yet on CentOS 6. The bug is in “ifdown-eth” script on CentOS which looks like following :
if [ -d "/sys/class/net/${REALDEVICE}" ]; then if [ "${REALDEVICE}" = "${DEVICE}" ]; then ip addr flush dev ${REALDEVICE} scope global 2>/dev/null else ip addr flush dev ${REALDEVICE} label ${DEVICE} scope global 2>/dev/null fi [...]
The issue is in the loop-back interface, so we have to change the script to something like following:
if [ -d "/sys/class/net/${REALDEVICE}" ]; then if [ "${REALDEVICE}" = "lo" ]; then SCOPE="host" else SCOPE="global" fi if [ "${REALDEVICE}" = "${DEVICE}" ]; then ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null else ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null fi [...]
After changing the script and restarting the interface, the server was working fine again.
I hope this can help you all, who faces the same issue.