-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: ensure systemd-resolved is set by default #344
base: main
Are you sure you want to change the base?
Conversation
build_scripts/40-services.sh
Outdated
# Resolved by default as DNS resolver | ||
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it best to symlink this here, or via tmpfiles?
Is /etc/resolv.conf something the user may want to change?
This may be perfectly fine - I'm just not sure of any implications of symlinking via the container build if the user wants to update the config file
I guess it should be fine - the symlink will just mean the changes on a running system are accessible in /run/systemd/..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably here, if there is any /etc/resolv.conf
file there by default it doesnt get replaced by networkmanager or tailscale. We can iterate on this later if for whatever reason this breaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it should be here (or some similarly appropriate location in the Container build). It should not be in tmpfiles since tmpfiles may override a user's change, but doing it here we default to the desired behavior (using systemd-resolved's stub config) but anyone can modify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should change this symlink however...
ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
is how this is configured on Fedora
@bsherman When we build stuff, |
I thought it would be something like this. I'm quite strongly opposed to the use of It may work to follow the lead of systemd-resolved itself...
That should work for DNS lookups from within container, and create the symlink pointing to the desired location. |
…n modify it later
# Necessary so that we get DNS resolution when podman build --dns none is specified | ||
# FIXME: Maybe figure out some better solution for this | ||
cp -f /etc/resolv-host.conf /etc/resolv.conf | ||
cat /etc/resolv.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tulilirockz I think you've confirmed this approach is working, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works locally, but github actions hates it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it seems to be mounting a systemd resolved stub: https://github.com/ublue-os/bluefin-lts/actions/runs/13571468379/job/37937333918?pr=344#step:7:157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this would work locally unless you aren't using systemd-resolved on your local build host.
Fixes: #246