lxcbr0 missing after starting lxc-net.service

Bug #1472369 reported by Ryan Harper
This bug report is a duplicate of:  Bug #1468611: dnsmasq fails to start in lxc-net. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

1. % lsb_release -rd
Description: Ubuntu Wily Werewolf (development branch)
Release: 15.10

2. % apt-cache policy lxc
lxc:
  Installed: 1.1.2-0ubuntu3
  Candidate: 1.1.2-0ubuntu3
  Version table:
 *** 1.1.2-0ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status

3. sudo systemctl restart lxc-net.service should bring up lxcbr0 bridge device

4. lxcbr0 device is not present after starting/restarting lxc-net.service

(kriek) ~ % sudo systemctl restart lxc-net.service
(kriek) ~ % sudo systemctl status -l lxc-net.service
● lxc-net.service - LXC network bridge setup
   Loaded: loaded (/lib/systemd/system/lxc-net.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2015-07-07 13:33:15 CDT; 3s ago
  Process: 1764 ExecStop=/usr/lib/x86_64-linux-gnu/lxc/lxc-net stop (code=exited, status=0/SUCCESS)
  Process: 1769 ExecStart=/usr/lib/x86_64-linux-gnu/lxc/lxc-net start (code=exited, status=0/SUCCESS)
 Main PID: 1769 (code=exited, status=0/SUCCESS)

Jul 07 13:33:15 kriek systemd[1]: Starting LXC network bridge setup...
Jul 07 13:33:15 kriek lxc-net[1769]: dnsmasq: cannot read /etc/dnsmasq.conf: No such file or directory
Jul 07 13:33:15 kriek systemd[1]: Started LXC network bridge setup.
(kriek) ~ % brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.5254005821b0 yes virbr0-nic
(kriek) ~ % ifconfig lxcbr0
lxcbr0: error fetching interface information: Device not found

My wily system does not have a dnsmasq.conf and without one which includes the conf-dir = /etc/dnsmasq.d
directive, then lxc-net does not come up.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: lxc 1.1.2-0ubuntu3
ProcVersionSignature: Ubuntu 4.0.0-4.6-generic 4.0.7
Uname: Linux 4.0.0-4-generic x86_64
ApportVersion: 2.17.3-0ubuntu4
Architecture: amd64
Date: Tue Jul 7 13:35:41 2015
InstallationDate: Installed on 2015-05-10 (57 days ago)
InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.3)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx

Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Pau Iranzo (paugnu) wrote :

Hi,

I've run into the same problem and haven't found any useful answers so far. However, doing exactly the opposite explained here:
https://community.flockport.com/topic/25/lxc-net-fails-to-create-bridge-on-ubuntu-server-14-04-1

It works for me.

So, temporary solution:

$ vim /etc/dnsmasq.d/lxc

Comment all lines:

# Tell any system-wide dnsmasq instance to make sure to bind to interfaces
# instead of listening on 0.0.0.0
# WARNING: changes to this file will get lost if lxc is removed.
#bind-interfaces
#except-interface=lxcbr0

So the file ends up doing nothing. After restarting the system, I get my lxcbr0 back and I can access to my lxc machines again.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@paugnu

which ubuntu release are you on and what is your dnsmasq version? (dpkg -l dnsmasq) Do you have bind installed?

Does creating /etc/dnsmasq.conf fix without having to clear out /etc/dnsmasq.d/lxc ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.