cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #00963
Re: [Merge] lp:~harlowja/cloud-init/cloud-init-dns-sysconfig into lp:cloud-init
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
Ya, so this is the special case where u have multiple networks configured for a interface; in that case we need to share the DNS idx across all the files that belong to that interface.
http://ithelpblog.com/os/linux/redhat/howto-create-sub-interface-or-secondary-ip-address-on-redhat-rhel/
These things; networking is crazy, lol.
> + 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