cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #00961
Re: [Merge] lp:~harlowja/cloud-init/cloud-init-dns-sysconfig into lp:cloud-init
This is fairly forward looking. Depending on the OS support for this sort of thing, it's certainly desirable for users to want to say things like "send queries to this server out this interface" however, I don't know of an OS that does this without more configuration elsewhere on the system.
For example, on Debian/Ubuntu, resolvconf and glibc certainly aren't doing this by default. One can imagine a more sophisticated bind or dnsmasq configuration but we're not doing that at this time.
Diff comments:
> === modified file 'cloudinit/net/sysconfig.py'
> --- cloudinit/net/sysconfig.py 2016-06-15 23:15:28 +0000
> +++ cloudinit/net/sysconfig.py 2016-06-18 01:07:35 +0000
> @@ -238,6 +247,13 @@
> iface_cfg.name))
> if 'netmask' in subnet:
> iface_cfg['NETMASK'] = subnet['netmask']
> + if 'dns_nameservers' in subnet:
> + for nameserver in subnet['dns_nameservers']:
> + ns_key = "DNS%s" % iface_cfg.last_dns_idx.value
The config/ini keys have to be unique even if they're in different files or sections?
I suppose so or you'd not need the shared index.
> + iface_cfg.last_dns_idx.value += 1
> + iface_cfg[ns_key] = nameserver
> + if 'dns_search' in subnet:
> + iface_cfg['SEARCH'] = " ".join(subnet['dns_search'])
> for route in subnet.get('routes', []):
> if _is_default_route(route):
> if route_cfg.has_set_default:
--
https://code.launchpad.net/~harlowja/cloud-init/cloud-init-dns-sysconfig/+merge/297817
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/cloud-init-dns-sysconfig into lp:cloud-init.
References