Bug 57237 - systemd-nspawn doesn't updates /etc/resolv.conf
Summary: systemd-nspawn doesn't updates /etc/resolv.conf
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-17 21:48 UTC by Maksim Melnikau
Modified: 2013-05-06 19:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Maksim Melnikau 2012-11-17 21:48:23 UTC
It is nice, that systemd-nspawn updates /etc/localtime, but it will be nice, if /etc/resolv.conf also will be updated/copied from "host" if not exists/etc.

Steps to reproduce:
1. ping google.com
2. PING google.com (173.194.71.102) 56(84) bytes of data.
3. systemd-nspawn -D /some/path (where /etc/resolv.conf not exists/old/etc)
4. ping google.com
5. ping: unknown host google.com

P.S. there is nice workaround, if dnsmasq runned on "host", "guest" have working DNS resolving, even without /etc/resolv.conf
Comment 1 Tom Gundersen 2012-11-28 15:40:09 UTC
This should be fixed in v184. Can you confirm that it works for you?
Comment 2 Maksim Melnikau 2012-11-30 22:07:56 UTC
(In reply to comment #1)
> This should be fixed in v184. Can you confirm that it works for you?
It still exists in systemd 195, I'm running systemd 195 on host and guest

# systemctl --version
systemd 195

systemd-nspawn -D /media/gsoho -b
# stat /etc/resolv.conf
stat: cannot stat ‘/etc/resolv.conf’: No such file or directory
Comment 3 Lennart Poettering 2013-01-15 01:02:17 UTC
for the bind mount to work we currently need a stub file in the container, that we can overmount. We could first create an empty stub file i guess, but not sure that would be a good idea...
Comment 4 Lennart Poettering 2013-05-06 19:21:40 UTC
Fixed in git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.