toolbox: /etc/resolv.conf is broken when it's an absolute symbolic link on the host
systemd-resolved has you symlink /etc/resolv.conf to some other location (under /run/systemd/resolve). When the host volume /etc is mounted, this location of course does not exist, so all hostname access within the container fails.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 19 (8 by maintainers)
Commits related to this issue
- cmd/initContainer: Follow symlinks when redirecting There has been a long standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Follow symlinks when redirecting There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were pro... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Reinforce symlink redirection There has been a long-standing issue[0] when symlinking /etc/resolv.conf to /run/host/etc/resolv.conf (host's resolv.conf). Many solutions were propos... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
- cmd/initContainer: Try to handle config files that're absolute symlinks Currently toolbox containers can get misconfigured if some configuration files on the host are absolute symbolic links to some ... — committed to HarryMichal/toolbox by HarryMichal 4 years ago
I sent a fix for that in PR #380 a while ago.
Just making sure we stay on top of it 😃 Fedora is aiming to enable
systemd-resolvedby default in Fedora 33 (link).An update about the impending
systemd-resolvedchange in Fedora 33.By default, Fedora will ship
/etc/resolv.confas a relative symbolic link to../run/systemd/resolve/stub-resolv.conf, and so does Ubuntu. This already works since Toolbox 0.0.14 because of commit d63b0a9c0f1cd8a137ebc818b297f3b9303b5c32This situation is an illustration of the benefits of a relative symbolic link. It ensures that the link continues to resolve properly even when the prefix or the root is changed.
So, if you need a quick solution that works with Toolbox as it’s shipping today, I’d suggest switching to a relative symbolic link on your systems.
What doesn’t work, and we need to fix, are absolute symbolic links. ie., a
/etc/resolv.confthat links to/run/systemd/resolve/stub-resolv.conf.This is tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1785244 as well.