Bug#881310: systemd-container: systemd-nspawn containers get non-functioning /etc/resolv.conf

Alex King alex at king.net.nz
Fri Nov 10 00:10:38 GMT 2017


Package: systemd-container
Version: 232-25+deb9u1
Severity: normal
Tags: upstream

Dear Maintainer,

After installing the package to get systemd-nspawnd, I created an etch
image with:

# cd /var/lib/machines
# debootstrap --variant=minbase --no-check-gpg --arch=i386 etch etchruby \
http://archive.debian.org/debian/

This system can't resolve DNS names:

# systemd-nspawn --directory etchruby/
Spawning container etchruby on /var/lib/machines/etchruby.
Press ^] three times within 1s to kill container.
etchruby:~# apt-get update
Err http://archive.debian.org etch Release.gpg
  Temporary failure resolving 'archive.debian.org'
Failed to fetch http://archive.debian.org/debian/dists/etch/Release.gpg  Temporary failure resolving 'archive.debian.org'
Reading package lists... Done
E: Some index files failed to download, they have been ignored, or old ones used instead.

/etc/resolv.conf inside the container is apparently bind-mounted from the
host's /lib/systemd/resolv.conf, and cannot be modified inside the container.

This is probably only a problem for non-systemd containers, as systemd
presumably has some workaround.  It also presumably is only a problem if
systemd-resolved is not used (as is standard in Debian.)

This appears to be identified at https://github.com/systemd/systemd/issues/4649
and closed in https://github.com/systemd/systemd/pull/5369, not sure if that's
made it in to a release yet.

Would be nice to have a fix for this in Debian.


-- System Information:
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.96-rh115-20171102201402.xenU.x86_64 (SMP w/1 CPU core)
Locale: LANG=en_NZ.utf8, LC_CTYPE=en_NZ.utf8 (charmap=UTF-8), LANGUAGE=en_NZ.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd-container depends on:
ii  dbus             1.10.22-0+deb9u1
ii  libacl1          2.2.52-3+b1
ii  libblkid1        2.29.2-1
ii  libbz2-1.0       1.0.6-8.1
ii  libc6            2.24-11+deb9u1
ii  libcurl3-gnutls  7.52.1-5+deb9u2
ii  libgcrypt20      1.7.6-2+deb9u2
ii  libip4tc0        1.6.0+snapshot20161117-6
ii  liblzma5         5.2.2-1.2+b1
ii  libseccomp2      2.3.1-2.1
ii  libselinux1      2.6-3+b3
ii  systemd          232-25+deb9u1
ii  zlib1g           1:1.2.8.dfsg-5

Versions of packages systemd-container recommends:
ii  btrfs-progs        4.7.3-1
ii  libnss-mymachines  232-25+deb9u1

systemd-container suggests no packages.

-- no debconf information



More information about the Pkg-systemd-maintainers mailing list