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

Michael Biebl biebl at debian.org
Fri Nov 10 02:28:09 GMT 2017


Control: tags -1 + moreinfo

Am 10.11.2017 um 01:10 schrieb Alex King:
> 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.

I can't reproduce the problem. I don't have systemd-resolved enabled
though. My guess is that you have resolved enabled (but not properly
configured), that's why systemd-nspawn picks up /lib/systemd/resolv.conf

How does your /etc/resolv.conf look like in the container?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20171110/81dce0be/attachment-0001.sig>


More information about the Pkg-systemd-maintainers mailing list