After a quick glance at cloud-init code, it seems to me it does not
check /etc/resolv.conf for symlinks.
It just reads /etc/resolv.conf if it is a file, then writes its own
nameservers into target. I have seen no rm of original /etc/resolv.conf,
so I guess it rewritten target of symlink on Fedora 33:
/run/systemd/resolve/stub-resolv.conf
I think there are two possible fixes:
* cloud-init would check the symlink and target of etc/resolv.conf. If
it points to /run/systemd/resolve/*, write DNS=x y into
/etc/systemd/resolved.conf.d/*cloud-init.conf
* clound-init would always delete etc/resolv.conf before it writes into
it, if it was symlink.
* systemd-resolved would check contents of link target of
/etc/resolv.conf on startup. If it leads to systemd, try parsing its
contents. If it does not look like managed contents of systemd, assume
it might be misdirected resolv.conf configuration. Store it and wait for
DHCP configuration. If no better configuration arrives, use nameservers
from misdirected file. Would have to restore original resolv.conf on
shutdown to keep working after restarts. Should move it to fallback.conf
and use it instead of built-in fallbacks?
1.
https://github.com/canonical/cloud-init/blob/66e2d42dd1b722dc8e59f4e5990c...
On 2/22/21 4:45 PM, Michael Catanzaro wrote:
On Mon, Feb 22, 2021 at 12:05 pm, Tomasz Torcz
<tomek(a)pipebreaker.pl>
wrote:
> 3) Configure DNS resolvers if you want to use DNS.
> Or dig deeper: why cloud-init disabled DNS on your installation?
I'm pretty sure cloud-init just doesn't know how to configure
systemd-resolved at all. So I suspect this is a cloud-init bug. See:
https://pagure.io/fedora-server/issue/10.
I have no strong opinion on whether the fallback should have been
removed or not. The fallback was only hiding the real problem, after all.
_______________________________________________
devel mailing list -- devel(a)lists.fedoraproject.org
To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure
--
Petr Menšík
Software Engineer
Red Hat,
http://www.redhat.com/
email: pemensik(a)redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB