Diff comments:
> diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py > index f572796..6e11247 100644 > --- a/cloudinit/net/sysconfig.py > +++ b/cloudinit/net/sysconfig.py > @@ -347,6 +347,16 @@ class Renderer(renderer.Renderer): > else: > iface_cfg['GATEWAY'] = subnet['gateway'] > > + if 'dns_search' in subnet: > + if isinstance(subnet['dns_search'], (list, tuple)): Is adding the dns search and nameservers info into the network_state dict the right thing to do here? It looks like dns info from all interfaces, not just subnets of the current one, is being added, and it produces bad output e.g.,: iface lo inet loopback dns-nameservers 69.9.160.191 69.9.191.4 10.0.0.1 dns-search foo.com when it should be iface lo inet loopback dns-nameservers 10.0.0.1 dns-search foo.com Doing only the listify and not adding the info to the network_state dict there seems to do the right thing. > + iface_cfg['DOMAIN'] = ' > '.join(subnet['dns_search'][:3]) > + else: > + iface_cfg['DOMAIN'] = subnet['dns_search'] > + > + if 'dns_nameservers' in subnet: > + for i, k in enumerate(subnet['dns_nameservers'][:3], 1): > + iface_cfg['DNS' + str(i)] = k > + > @classmethod > def _render_subnet_routes(cls, iface_cfg, route_cfg, subnets): > for i, subnet in enumerate(subnets, start=len(iface_cfg.children)): -- https://code.launchpad.net/~rmccabe/cloud-init/+git/cloud-init/+merge/333722 Your team cloud-init commiters is requested to review the proposed merge of ~rmccabe/cloud-init:bug1705804-2 into cloud-init:master. _______________________________________________ Mailing list: https://launchpad.net/~cloud-init-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp

