Vivid /usr/lib/x86_64-linux-gnu/lxc/lxc-net fails at boot time because named listening to UDP on LXC address

Bug #1458063 reported by David Favor
This bug report is a duplicate of:  Bug #1240757: Bridge not created if bind9 is on. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is a clean Vivid install (rather than upgrade).

Maybe I munged something + for the life of me nothing comes to mind.

/var/log/syslog shows somehow bind is polluted with dnsmasq addresses?

All packages updated.

net8-rmt# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

net8-rmt# uname -a
Linux ns515383.ip-167-114-159.net 3.19.0-18-generic #18-Ubuntu SMP Tue May 19 18:31:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

net8-rmt# pkg-list | egrep -e lxc -e cgroup
cgroup-bin 0.38-1ubuntu2
cgroup-lite 1.10
libcgroup1 0.38-1ubuntu2
liblxc1 1.1.2-0ubuntu3
lxc 1.1.2-0ubuntu3
lxc-templates 1.1.2-0ubuntu3
lxcfs 0.7-0ubuntu4
lxctl 0.3.1+debian-3
python3-lxc 1.1.2-0ubuntu3

Behavior is this.

1) After reboot, lxcbr0 is missing

2) /usr/lib/x86_64-linux-gnu/lxc/lxc-net restart

reports 10.0.3.1 (set in /etc/default/lxc-net ) as being in use.

3) netstat reports bind/named has the address, at least UDP, no TCP.

4) /var/log/syslog from last boot shows this...

net8-rmt# grep 10.0.3.1 /var/log/syslog
May 22 16:03:01 ns515383 named[1355]: listening on IPv4 interface lxcbr0, 10.0.3.1#53
May 22 16:03:02 ns515383 ntpd[1453]: Listen normally on 5 lxcbr0 10.0.3.1 UDP 123
May 22 16:03:04 ns515383 lxc-net[1360]: dnsmasq: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:03:04 ns515383 dnsmasq[1768]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:03:06 ns515383 ntpd[1453]: Deleting interface #5 lxcbr0, 10.0.3.1#123, interface stats: received=0, sent=0, dropped=0, active_time=4 secs
May 22 16:21:04 ns515383 dnsmasq[10991]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:21:30 ns515383 dnsmasq[11156]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:24:15 ns515383 dnsmasq[12092]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:25:36 ns515383 dnsmasq[12576]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:29:54 ns515383 dnsmasq[14015]: failed to create listening socket for 10.0.3.1: Address already in use
May 22 16:34:55 ns515383 named[1355]: no longer listening on 10.0.3.1#53
May 22 16:35:10 ns515383 ntpd[1453]: Listen normally on 9 lxcbr0 10.0.3.1 UDP 123
May 22 16:35:26 ns515383 ntpd[1453]: Deleting interface #9 lxcbr0, 10.0.3.1#123, interface stats: received=0, sent=0, dropped=0, active_time=16 secs
May 22 16:52:50 ns515383 ntpd[1453]: Listen normally on 11 lxcbr0 10.0.3.1 UDP 123

5) Nothing in named config referencing the LXC IP.

6) Then after server minutes, named stops listening to this address, at which time
/usr/lib/x86_64-linux-gnu/lxc/lxc-net restart begins working as expected.

7) If /usr/lib/x86_64-linux-gnu/lxc/lxc-net stop is issued + service bind9 restart issued,
named no longer attempts to connect to 10.0.3.1 so all's well.

Any suggestions on why named might be grabbing the LXC address at boot time are appreciated.

I reported this as a bug, because none of the named config files reference the LXC IP address,
so to me, named should never touch this address.

Revision history for this message
David Favor (davidfavor) wrote :

Oh... Maybe the problem is lxcbr0 is up'ed before named starts.

Then if named listens on 0.0.0.0 makes sense it would glom onto the lxcbr0 address too.

I'll modify named's config files + reboot + see if this fixes the problem.

summary: - Vivid /usr/lib/x86_64-linux-gnu/lxc/lxc-net fails at boot time
+ Vivid /usr/lib/x86_64-linux-gnu/lxc/lxc-net fails at boot time because
+ named listening on LXC address
summary: Vivid /usr/lib/x86_64-linux-gnu/lxc/lxc-net fails at boot time because
- named listening on LXC address
+ named listening to UDP on LXC address
Revision history for this message
David Favor (davidfavor) wrote :

Adding the following to /etc/named/named.conf.options seems to have fixed this problem:

listen-on { 127.0.0.1; 167.114.159.29; };

This seems like a bug to me. Maybe switching to systemd created a subtle change in order of network config + named + lxc-net start.

This is the first time I've had to edit bind's config files to have LXC networking start at boot time.

Revision history for this message
David Favor (davidfavor) wrote :

This does appear to relate to initial installs + some type of ordering change, of how services start.

All other machines I manage had updates, rather than fresh installs + all the updated machines work.

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

So is this a duplicate of bug 1240757 ?

Revision history for this message
David Favor (davidfavor) wrote :

I believe this is a duplicate of bug 1240757.

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.