Containers based on SLES 9 and SLES 10 have no networking after starting on a server running kernel
2.6.32-042stab102.X and later. Major symptom is - loopback device is not configured:
[root@pvcfl ~]# vzlist 100500 CTID NPROC STATUS IP_ADDR HOSTNAME 100500 13 running 10.39.92.141 - [root@pvcfl ~]# vzctl enter 100500 entered into Container 100500 localhost:~ # ifconfig localhost:~ # ifup lo ERROR: No configuration found for lo localhost:~ #
getcfg-interface command execution leads to segmentation fault:
localhost:~ # getcfg-interface -d . -f ifcfg- -- '' Segmentation fault
ifup implies execution of
getcfg-interface. Segmentation fault prevents loopback interface from starting, which is crucial for networking in the container.
The root cause of the issue is a bug in SLES, particularly in
sysconfig package. It scans
/sys/block folder and tries to iterate over list of interfaces, however there is no check that
/sys/block directory is empty. It worked on previous kernels since
/sys/block/ directory was not present there at all. Starting kernel from
2.6.32-042stab102.X directory is present, but empty, thus triggering this bug.
In order to bypass the bug in SLES 10, request with internal ID #PSBM-32744 was submitted.
Permanent fix is planned to the future updates.
For now, it's possible to use one of the following workarounds:
Reboot into an older kernel,
2.6.32-042stab94.7 or older.
Create custom action script for container startup which would mount any non-empty directory into
~# cat /vz/private/<CTID>/scripts/start #!/bin/bash mount -o bind /etc /sys/block
Do not forget to set executable permissions:
~# chmod +x /vz/private/<CTID>/scripts/start
<CTID> with an actual container ID.
In order to automate the workaround #2 for all existing containers based on SLES 9 or SLES 10 you may download and execute attached script:
# wget http://kb.plesk.com/Attachments/kcs-49013/kb125095.sh # chmod +x kb125095.sh # ./kb125095.sh