lxc-net incompatible with systemd-resolved

Bug #1700500 reported by Alex Garel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Symptoms
--------

If an lxc container named *mycontainer* runs, it is not accessible using name *mycontainer.lxc*.

Causes
------

The lxc1 package provides the lxc-net.service which launch a dns-masq process to act as dns providing name resolution to local lxc instances using the .lxc domain.

This DNS is however not declared to systemd-resolved, and so .lxc names do not work on a standard ubuntu install.

Proposed solution
-----------------

The lxc1 package should provide a /etc/systemd/resolved.conf.d/lxc.conf with the following content::

  [Resolve]
  DNS=10.0.3.1
  Domains=~.lxc
  DNSSEC=false

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: lxc1 2.0.8-0ubuntu1~17.04.2
Uname: Linux 4.10.16-041016-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon Jun 26 11:07:24 2017
InstallationDate: Installed on 2015-11-10 (593 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: lxc
UpgradeStatus: Upgraded to zesty on 2017-02-25 (120 days ago)
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
Alex Garel (alex-garel) wrote :
Revision history for this message
steve cohen (steve-si9yrl01qsu4bt4tonx56g) wrote :

/etc/systemmd/resolved.conf
DNS=10.0.3.1
Domains=lxc

recheck cat /etc/resolv.conf
it should have added a search for lxc with nameserver still at 127.0.0.53

Revision history for this message
Alex Garel (alex-garel) wrote :

(Sorry if I misunderstand your answer)

I didn't ask how to do it. The bug reports tells that it should be working out of the box, but it's not. This is because ubuntu switched to systemd-revolved and this package do not provide the necessary bridge, which is the configuration bit you provide (and that I already provide in the description).

Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
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.