cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02608
Re: [Merge] ~rmccabe/cloud-init:bug1693251 into cloud-init:master
I've added a couple of inline comments.
Diff comments:
> diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
> index f7d4548..b5c90a6 100644
> --- a/cloudinit/net/sysconfig.py
> +++ b/cloudinit/net/sysconfig.py
> @@ -447,6 +451,21 @@ class Renderer(renderer.Renderer):
> content.add_search_domain(searchdomain)
> return "\n".join([_make_header(';'), str(content)])
>
> + @staticmethod
> + def _render_networkmanager_conf(network_state):
> + content = networkmanager_conf.NetworkManagerConf("")
> +
> + # If DNS server information is provided, configure
> + # NetworkManager to not manage dns, so that /etc/resolv.conf
> + # does not get clobbered.
> + if network_state.dns_nameservers:
In render_network_state, the check used to determine if cloud-init should write /etc/resolv.conf is "if self.dns_path". Should we be using the same logic in both places (i.e., should the check for "cloud-init should write /etc/resolv.conf?" be the same as the check for "should we prevent NM from managing resolv.cinf?")?
> + content.set_section_keypair('main', 'dns', 'none')
> +
> + if len(content) == 0:
> + return None
> + out = "".join([_make_header(), "\n", "\n".join(content.write()), "\n"])
Should this actually be part of the NetworkManagerConf class (so that here we would only need to call content.write())?
> + return out
> +
> @classmethod
> def _render_bridge_interfaces(cls, network_state, iface_contents):
> bridge_filter = renderer.filter_by_type('bridge')
--
https://code.launchpad.net/~rmccabe/cloud-init/+git/cloud-init/+merge/325325
Your team cloud-init commiters is requested to review the proposed merge of ~rmccabe/cloud-init:bug1693251 into cloud-init:master.
References