-
Notifications
You must be signed in to change notification settings - Fork 59
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
F33: transitioning existing systems to systemd-resolved on upgrade #646
Comments
Yeah, all upgrade logic like this that depends on per-user/per-system state needs to be a systemd unit. Related discussion: https://mail.gnome.org/archives/ostree-list/2020-February/msg00000.html |
Discussed with Luca and Jonathan. We agreed we don't have to solve this migration problem for the first release of F33 into the We also noted that this is a problem that will need to be solved for other OSTree distributions for upgrades as well. |
Just a data point: This change broke an install of mine that has unbound running as a caching dns server in a container. Because that container could no longer start all the others that depend on working dns ceased to work as well. I have fixed this for now by masking |
First off, thank you for running Just so I understand fully, the |
Discussed this briefly with @jlebon and @bgilbert. In the past we may have considered only shipping the enabled
|
That sounds sensible - thanks for picking the issue up. |
With FCCT, you can also use:
|
The only problem there that I think people will run in to is that there is no |
oh actually, I forgot we just added it (but disabled by default). |
One thing we discussed in the community meeting was whether we should have the "conditional on NM-managed" bit. It technically deviates from the Fedora version of this. It makes sense offhand, though... since we're not actively disabling systemd-resolved in that case, it basically means that anyone who's touched If instead we just say "we only look at Not sure, I think I'm good either way, but just wanted to flag this. |
I ran into the following issue when trying out next release 33.20201006.1.0: https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues Since systemd-resolved configures a stub listener on the loopback interface. While the kubelet by default will have pods with the As far as I can tell, this will probably break DNS resolving on most Kubernetes installations. Since most clusters will have a CoreDNS deployed with the |
Thanks for pointing that out @basvdlei - the doc you linked to mentioned to use That file isn't the stub (which is at cc @dghubble @vrutkovs - do OKD and Typhoon have any special casing here? |
We're running OKD 4.6 nightlies with systemd-resolved enabled and didn't hit any problems so far |
@dustymabe for historical reasons our kubelet container is running with Both podman and moby now have (mostly undocumented) work-arounds to use systemd-resolved non-stubbed's I can probably also remove the Hopefully I'm the only one crazy enough to have done this 😀 |
FCOS 32
FCOS 33
CL / Flatcar
Kubelet uses the default
|
Oh nice, thanks @basvdlei. So looks like podman is indeed intentionally seeing that |
@dghubble yeah, it's not really obvious/transparent. Thanks for looking and all your hard work on Typhoon! @dustymabe just wanted to confirm I can work around this issue by relying on podman to provision the Thinking out loud, so feel free to ignore. With "everything running in containers" on FCOS, almost nothing will be able to use the stub listener. Container workloads have none of the benefits, while DNS queries might give different results whether your inside a container of not. While not using stub config is a safer upgrade path. |
Right. The systemd-resolved change is only in |
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This is the first f33 release on the `testing` stream. Let's make it a barrier as agreed upon in coreos/fedora-coreos-tracker#646.
This is the first f33 release on the `testing` stream. Let's make it a barrier as agreed upon in coreos/fedora-coreos-tracker#646.
This is the first f33 release on the `testing` stream. Let's make it a barrier as agreed upon in coreos/fedora-coreos-tracker#646.
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646 (cherry picked from commit 56b0ceb)
This systemd unit migrates the /etc/resolv.conf file on systems to point to ../run/systemd/resolve/stub-resolv.conf if users haven't set up a custom resolv.conf. It will only run on Fedora 33 systems and will only execute once (a single migration). Fixes: coreos/fedora-coreos-tracker#646 (cherry picked from commit 56b0ceb)
Note that due to complications we decided to not use systemd-resolved, but leave it enabled for now. This migration script will still run and systemd-resolved is still serving a function of populating entries in the file that is pointed to by |
Some of the servers I maintain have updated to the latest Fedora CoreOS stable release this morning and all of them suddenly ran into DNS issues and it turned out to be an issue with systemd-resolved having been automatically enabled. After the update,
Just wanted to ask if I should actually go ahead and completely mask systemd-resolved instead if I am already on F33 or whether what I have done is enough to solve the issue. EDIT: Even with the service being masked before upgrading to F33 it seems the resolv.conf file still gets replaced with a symlink to stub-resolv.conf. Not sure if this has any relevance or whether that's erroneous behavior. |
hey @icedream - I'm almost certain you're hitting the SELinux issue mentioned in https://discussion.fedoraproject.org/t/fedora-coreos-rebasing-to-fedora-33-features-and-known-issues/25474. If that's the case follow the steps to restore the SELinux policy from the base config and then apply your settings back on top. If possible please leave |
It turns out I do have a changed SELinux policy due to me launching SSH without systemd socket activation on a separate port. That change occurs on every boot though due to a system service I set up, so I will follow this and see if it works, thank you very much for the info @dustymabe! |
Unfortunately after a bit of researching it seems that EDIT: Experimental thought, but one could immediately overwrite the policy files via Anyways, that will do as a workaround for me to get DNS with systemd-resolved back working. |
With the change to systemd-resolved we need to do some sort of intervention to make the systemd-resolved change take effect on existing systems that are upgraded.
The scriptlets for the
systemd
rpm have something for this but "upgrade" logic for OSTree systems doesn't really work because the compose starts with a fresh world view every time:For us on existing systems the resolv.conf file will already exist and contain some contents like:
I suggest we write some migration logic that basically detects the
# Generated by NetworkManager
and runs theln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
if it has that in it. According to the change document, as long as that symlink is set up NetworkManager knows what to do to take advantage of systemd-resolved.Any
resolv.conf
that had been hand edited and not managed by NetworkManager would be left alone.The text was updated successfully, but these errors were encountered: