| Summary: | issues with network-manager handling of resolv.conf when systemd-resolved is not enabled | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Carlos Alberto Lopez Perez <clopez> |
| Component: | connectivity | Assignee: | Kai Kang <kai.kang> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bst, liezhi.yang, maxin.john, meta.mr.watcher, meta.watcher, randy.macleod, stephano |
| Version: | unspecified | ||
| Target Milestone: | 2.7 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Carlos Alberto Lopez Perez
2017-08-23 18:04:01 UTC
Option I see going forward: Option A) Make NM follow symlinks (readlink -f) and use a different target path for the resolv.conf file at /run than the one used when resolved is enabled. Option B) Use a different ALTERNATIVE_TARGET for the resolv-conf alternative link at /etc/resolv.conf (and at the same time try to use a different destination name in /run/resolv.conf just in case NM someday decides to follow symlinks readlink -f) (In reply to comment #0) > So the fix could be to symlink /etc/resolv.conf to a different path in /run > when systemd-resolved is not enabled, right? > > The issue is that after commit 00f1cc1a85ee736773442cd82f3225ff9f731e8c in > meta-openembedded <https://git.io/v5L4S> /etc/resolv.conf always points to > /etc/resolv-conf.systemd and at the same time the path > /etc/resolv-conf.systemd is also checked by network-manager as one of the > targets to detect. I wonder why ${sysconfdir}/resolv-conf.systemd is created when resolved is not enabled? Maxin, any ideas on this one? I have workarounded this by creating a NM config-file that changes the default DNS update method from "symlink" to "file". * With the "symlink" method (the default), nm updates only /run/NetworkManager/resolv.conf and then updates the /etc/resolv.conf link under certain conditions (like resolv.conf not pointing to a systemd-resolved file) * With update method "file", the content of /etc/resolv.conf is always updated (following any symlink) with the contents of the upstream DHCP DNS entries. To set update method "file" this config-file can be used: #/etc/NetworkManager/NetworkManager.conf [main] rc-manager=file Reassigning Jussi's bugs. This is still an issue. Using NetworkManager with the default config does not work. Setting.. dns=default rc-manager=file ..works, but this is not the desired solution. Fixed by commits http://git.openembedded.org/openembedded-core/commit/?id=d9b6d538e3d81ab0d5e7b7b6adecef555d782217 http://git.openembedded.org/openembedded-core/commit/?id=732e1f74bb9f5ecc98b29197f6bcab117710adab *** This bug has been marked as a duplicate of bug 11331 *** |