History log of /lxc/config/init/common/lxc-net.in
Revision Date Author Comments Expand
8470f20027cc3344d55ae2f475f7d0723c354393 20-Mar-2017 Carsten Brandt <mail@cebe.cc>

Make lxc-net return non-zero on failure I found that even though the service lxc-net failed to start because I made some wrong configuration settings the command exists zero. So systemd reports the status of the service as good even though it failed: # service lxc-net status ● lxc-net.service - LXC network bridge setup Loaded: loaded (/lib/systemd/system/lxc-net.service; enabled) Active: active (exited) since Wed 2017-02-08 08:17:32 EST; 21min ago Process: 529 ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-net start (code=exited, status=0/SUCCESS) Main PID: 529 (code=exited, status=0/SUCCESS) CGroup: /system.slice/lxc-net.service Feb 08 08:17:30 dvm2 systemd[1]: Starting LXC network bridge setup... Feb 08 08:17:32 dvm2 lxc-net[529]: dnsmasq: failed to create listening socket for 10.2.2.1: Address already in use Feb 08 08:17:32 dvm2 lxc-net[529]: Failed to setup lxc-net. Feb 08 08:17:32 dvm2 systemd[1]: Started LXC network bridge setup. Adding `exit 1` here makes it exit non-zero to make systemd recognize the failure. Signed-off-by: Carsten Brandt <mail@cebe.cc>

6d14aa2b8a3d924fde5673073ae1c6bb4917f604 23-Nov-2016 Cam Cope <cam@dropbox.com>

Configure a static MAC address on the LXC bridge Signed-off-by: Cam Cope <cam@dropbox.com>

cdcae1034cb0e0ead1a3777ad5ce679e2a5883ef 10-Dec-2015 TAMUKI Shoichi <tamuki@linet.gr.jp>

Fold dnsmasq command line in lxc-net.in Fold dnsmasq command line at about 80 chars because the line is too long. Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

dfb5edcac0c825637d26b0a8ab5a7cf62485c857 29-Jun-2015 Stéphane Graber <stgraber@ubuntu.com>

lxc-net: Use iproute and relative paths everywhere (V2) V2 changes: - Keep using /var/lib for the lease file, but making it respect localstatedir - Don't pass an empty --conf-file as that confuses dnsmasq when /etc/dnsmasq.conf doesn't exist or isn't readable. Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

47fcda9926100d3ffbd01d848943a7eaf78655ff 28-Apr-2015 Stéphane Graber <stgraber@ubuntu.com>

Fix lxc-net regression on missing restorecon Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>

370f2e811c154109df7aea6ea1f9788768d0dd76 28-Apr-2015 Stéphane Graber <stgraber@ubuntu.com>

lxc-net: Rework/cleanup This updates lxc-net with the following changes: - Better recover from crashes/partial runs - Better error detection and reporting - Less code duplication (use the stop code on crash) - Better state tracking - Allow for restart of all of lxc-net except for the bridge itself - Only support iproute from this point on (ifconfig's been deprecated for years) V2: Use template variables everywhere Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

d47961ebd65ea45ba32d48d7065ce6d15ad7200d 24-Apr-2015 Stéphane Graber <stgraber@ubuntu.com>

Add IPv6 support to lxc-net Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

50066f4f7e8d53fe7b7a3acb039c7db5573f42dc 11-Mar-2015 Stéphane Graber <stgraber@ubuntu.com>

Prefer iproute over ifconfig Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

5fdd4b0c119f5bd14fed3d4a6424e5a4d00c360e 20-Jan-2015 S.Çağlar Onur < <caglar@10ur.org>

restore the dropped bits of 1c1bb85ad2b6 and also implement the logic suggested at https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-December/010985.html Signed-off-by: S.Çağlar Onur <caglar@10ur.org> Acked-by: Stéphane Graber <stgraber@ubuntu.com>

f3b8088dd8a65bc1ef7b0efcccfbe8c6c8d33202 08-Oct-2014 Dwight Engen <dwight.engen@oracle.com>

systemd/selinux init scripts fixups - RHEL/OL 7 doesn't have the ifconfig command by default so have the lxc-net script check for its existence before use, and fall back to using the ip command if ifconfig is not available - When lxc-net is run from systemd on a system with selinux enabled, the mkdir -p ${varrun} will create /run/lxc as init_var_run_t which dnsmasq can't write its pid into, so we restorecon it after creation (to var_run_t) - The lxc-net systemd .service file needs an [Install] section so that "systemctl enable lxc-net" will work Signed-off-by: Dwight Engen <dwight.engen@oracle.com>

0af993195cbd57cff700c7c90ee8f95c2a1ef8aa 26-Sep-2014 Michael H. Warfield <mhw@WittsEnd.com>

Rework init scripts This commit is based on the work of: Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com> A generic changelog would be: - Bring support for lxcbr0 to all distributions - Share the container startup and network configuration logic across distributions and init systems. - Have all the init scripts call the helper script. - Support for the various different distro-specific configuration locations to configure lxc-net and container startup. Changes on top of Mike's original version: - Remove sysconfig/lxc-net as it's apparently only there as a workaround for an RPM limitation and is breaking Debian systems by including a useless file which will get registered as a package provided conffile in the dpkg database and will therefore cause conffile prompts on upgrades... - Go with a consistant coding style in the various init scripts. - Split out the common logic from the sysvinit scripts and ship both in their respective location rather than have them be copies. - Fix the upstart jobs so they actually work (there's no such thing as libexec on Debian systems). Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>