Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1933863
Summary: | Broken hostname setting via reverse lookup with NetworkManager + systemd-resolved | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Lebon <jlebon> |
Component: | NetworkManager | Assignee: | Lubomir Rintel <lkundrak> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 34 | CC: | acardace, bgalvani, dcbw, dustymabe, fgiudici, gnome-sig, lkundrak, mclasen, rstrode, sandmann, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | NetworkManager-1.30.2-1.fc34 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-03-19 20:14:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jonathan Lebon
2021-03-01 21:24:06 UTC
OK right, I think what's going on here is that in the systemd-resolved case, NM considers /etc/resolv.conf unmanaged. This means that when the dns-manager updates systemd-resolved with the new DNS config, it doesn't emit a CONFIG_CHANGED signal. And so the hostname lookup isn't restarted. So... should that code be relaxed a bit so that CONFIG_CHANGED is emitted even if we're not managing /etc/resolv.conf but we updated a caching plugin? Something like: diff --git a/src/core/dns/nm-dns-manager.c b/src/core/dns/nm-dns-manager.c index d30c3fa549..5e03b102b7 100644 --- a/src/core/dns/nm-dns-manager.c +++ b/src/core/dns/nm-dns-manager.c @@ -1815,8 +1815,8 @@ plugin_skip:; NM_DNS_MANAGER_RESOLV_CONF_MAN_UNMANAGED); } - /* signal that resolv.conf was changed */ - if (do_update && result == SR_SUCCESS) + /* signal that DNS resolution configs were changed */ + if ((do_update || caching) && result == SR_SUCCESS) g_signal_emit(self, signals[CONFIG_CHANGED], 0); nm_clear_pointer(&priv->config_variant, g_variant_unref); Hi Jonathan, thanks for looking into this issue. The patch looks correct to me. Would you like to open a merge request at [1] for it or do you prefer if I do it? [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests Thanks for confirming Beniamino! I've tested the patch and confirmed it fixes the issue. Posted an MR. Thanks for merging! Are you planning to rebase NM in f34 before GA? If not, would it be possible to backport this patch to f34? I can draft up the dist-git PR for that if you'd like. We will do a 1.30.2 minor release this week and we will rebase the F34 package to this new version (which includes your commit). FEDORA-2021-fb173bc82f has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fb173bc82f FEDORA-2021-fb173bc82f has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fb173bc82f` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fb173bc82f See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-fb173bc82f has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. |