Re: systemd-resolved fallback DNS servers: usability vs. GDPR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a/cloudinit/net/sysconfig.py#L909

On 2/22/21 4:45 PM, Michael Catanzaro wrote:
> On Mon, Feb 22, 2021 at 12:05 pm, Tomasz Torcz <tomek@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxx
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux