cloud-init should configure networkmanager to not manage /etc/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Ryan McCabe |
Bug Description
Currently, cloud-init adds nameserver entries directly to /etc/resolv.conf but does not configure namservers in per-interface configuration files. This could be problematic because information received from other sources (e.g., from another interface that is using dhcp) could clobber the information in /etc/resolv.conf.
Unfortunately, at least under OpenStack, the nameserver information is not interface-scoped so it is not *possible* to correctly configure the interface configuration files.
The solution in this case is to ensure that NM will not attempt to update /etc/resolv.conf. The simplest way of doing this is to drop a file into /etc/NetworkMan
[main]
dns=none
This will prevent NetworkManager from managing /etc/resolv.conf.
Related branches
- Scott Moser: Approve
- Lars Kellogg-Stedman (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 132 lines (+69/-0)3 files modifiedcloudinit/distros/parsers/networkmanager_conf.py (+23/-0)
cloudinit/net/sysconfig.py (+25/-0)
tests/unittests/test_net.py (+21/-0)
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Ryan McCabe (rmccabe) |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
See also:
https:/ /bugs.launchpad .net/nova/ +bug/1693265