-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erratic behaviour with toolbox /etc/resolv.conf when changing its symlink target in host #718
Comments
@debarshiray any thoughts? What I would suggest after the bind mount is that we stop resolving /etc/resolv.conf further. Just allow it to always be a symlink to /run/host/resolv.conf and things should work consistently. |
Is this still a problem? Isn't this a duplicate of #187 ? This is what we have in the containers by default:
Generally speaking, things work best when the symbolic links are relative, not absolute. See the |
This one sounds like a duplicate of #187 and should definitely be fixed by #707 now. Even before, it would work just fine, if
Umm... I don't understand this one. From a high-level, we want the container's The problem is that
... and we do want to overwrite that. So, we take the lazy way out and always stomp over If it's a symbolic link that doesn't resolve, then we also stomp over it, because it's broken anyway. That means, we only skip touching valid symbolic links. Hence, users can tweak their containers by changing the target of the container's |
Iirc the original problem was toolbox was trying to be too smart resolving symlinks before creating image. And the path didn't update on subsequent runs resulting in mess if admin or distro reconfigures host DNS setup afterwards. I haven't tried to repro afterwards. The original bug happened because Fedora had bug where systemd-resolved wasn't used in first-time install and them rolled out package update that took it into use that broke any existing toolboxes. |
I think the basic logic has remain unchanged, at least for a very long time. eg., see this commit where the relevant code was re-written into Go. A lot of people were complaining about #187 because somehow they ended up with an absolute symbolic link on their hosts. However, I could be wrong, and symlinks are full of mischief. :) |
Closing. I think the problem is caused by the limitations of absolute symbolic links. Please leave a comment or re-open if you have reason to believe otherwise. |
Describe the bug
toolbox seems to resolve the final target of /etc/resolv.conf when creating the image. This is causing a set of weird side-effects
Steps how to reproduce the behaviour
Expected behaviour
Step 3 outputs /run/host/etc/resolv.conf, step 7 outputs /run/systemd/resolv/stub-resolv.conf
Actual behaviour
Step 3 outputs /run/host/etc/resolv.conf, step 7 outputs nothing because /etc/resolv.conf is now a symlink to a broken symlink
Output of
toolbox --version
(v0.0.90+)toolbox version 0.0.99.1
Toolbox package info (
rpm -q toolbox
)toolbox-0.0.99.1-1.fc34.x86_64
Output of
podman version
Podman package info (
rpm -q podman
)podman-3.0.1-1.fc34.x86_64
Info about your OS
Fedora SIlverblue 34
The text was updated successfully, but these errors were encountered: