Hi all, I just noticed that on new installs lxc 2.0.0.rc10 does not properly config its lxcbr0 on openSUSE machines.
The reason is that /usr/lib/lxc/lxc-net searches in /etc/default/lxc-net for the config, which is put in the directory /etc/sysconfig/lxc-net during installation. ############### config/init/common/lxc-net.in ############### #!/bin/sh distrosysconfdir="@LXC_DISTRO_SYSCONF@" varrun="@RUNTIME_PATH@/lxc" varlib="@LOCALSTATEDIR@/lib" # These can be overridden in @LXC_DISTRO_SYSCONF@/lxc # or in @LXC_DISTRO_SYSCONF@/lxc-net [...] ############################################# While the path in lxc-net.in is a variable set during configure, the path to the lxc-net config is hardcoded in the spec: ############### lxc.spec.in ############### %post # This test should trigger a network configure on a new install. if [ ! -f %{_sysconfdir}/sysconfig/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' %{_sysconfdir}/sysconfig/lxc-net then # Grab a random 10net subnet. Need to add test logic... while [ true ] do SUBNET=10.$(($RANDOM % 256)).$(($RANDOM % 256)) if ! ip -4 route ls | grep -q "^$SUBNET" then break fi done cat > %{_sysconfdir}/sysconfig/lxc-net <<EOF ############################################# How to solve it? Patching the spec with an %if statement is a workaround, but I'm not sure if this is a proper long term solution... Is there a rpm macro for the /etc/default vs. /etc/sysconfig/ directories? Kind regards, Johannes
signature.asc
Description: OpenPGP digital signature
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel