From 7fc49f60aa1cebc652f873beea8fc5ea87c135db Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 06 2018 18:38:04 +0000 Subject: import cloud-init-0.7.9-9.el7_4.6 --- diff --git a/SOURCES/0028-net-Allow-for-NetworkManager-configuration.patch b/SOURCES/0028-net-Allow-for-NetworkManager-configuration.patch new file mode 100644 index 0000000..72f6157 --- /dev/null +++ b/SOURCES/0028-net-Allow-for-NetworkManager-configuration.patch @@ -0,0 +1,164 @@ +From 5fc5da29e5187ff6f56c968e7c06fabd1fce62ad Mon Sep 17 00:00:00 2001 +From: Ryan McCabe +Date: Thu, 8 Jun 2017 13:24:23 -0400 +Subject: [PATCH] net: Allow for NetworkManager configuration + +In cases where the config json specifies nameserver entries, +if there are interfaces configured to use dhcp, NetworkManager, +if enabled, will clobber the /etc/resolv.conf that cloud-init +has produced, which can break dns. If there are no interfaces +configured to use dhcp, NetworkManager could clobber +/etc/resolv.conf with an empty file. + +This patch adds a mechanism for dropping additional configuration +into /etc/NetworkManager/conf.d/ and disables management of +/etc/resolv.conf by NetworkManager when nameserver information is +provided in the config. + +LP: #1693251 + +Resolves: rhbz#1454491 + +Signed-off-by: Ryan McCabe +(cherry picked from commit 67bab5bb804e2346673430868935f6bbcdb88f13) +--- + cloudinit/distros/parsers/networkmanager_conf.py | 23 +++++++++++++++++++++++ + cloudinit/net/sysconfig.py | 24 ++++++++++++++++++++++++ + tests/unittests/test_net.py | 21 +++++++++++++++++++++ + 3 files changed, 68 insertions(+) + create mode 100644 cloudinit/distros/parsers/networkmanager_conf.py + +diff --git a/cloudinit/distros/parsers/networkmanager_conf.py b/cloudinit/distros/parsers/networkmanager_conf.py +new file mode 100644 +index 00000000..ac51f122 +--- /dev/null ++++ b/cloudinit/distros/parsers/networkmanager_conf.py +@@ -0,0 +1,23 @@ ++# Copyright (C) 2017 Red Hat, Inc. ++# ++# Author: Ryan McCabe ++# ++# This file is part of cloud-init. See LICENSE file for license information. ++ ++import configobj ++ ++# This module is used to set additional NetworkManager configuration ++# in /etc/NetworkManager/conf.d ++# ++ ++ ++class NetworkManagerConf(configobj.ConfigObj): ++ def __init__(self, contents): ++ configobj.ConfigObj.__init__(self, contents, ++ interpolation=False, ++ write_empty_values=False) ++ ++ def set_section_keypair(self, section_name, key, value): ++ if section_name not in self.sections: ++ self.main[section_name] = {} ++ self.main[section_name] = {key: value} +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index ef80d99b..d496d916 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -5,6 +5,7 @@ import re + + import six + ++from cloudinit.distros.parsers import networkmanager_conf + from cloudinit.distros.parsers import resolv_conf + from cloudinit import util + +@@ -250,6 +251,9 @@ class Renderer(renderer.Renderer): + self.netrules_path = config.get( + 'netrules_path', 'etc/udev/rules.d/70-persistent-net.rules') + self.dns_path = config.get('dns_path', 'etc/resolv.conf') ++ nm_conf_path = 'etc/NetworkManager/conf.d/99-cloud-init.conf' ++ self.networkmanager_conf_path = config.get('networkmanager_conf_path', ++ nm_conf_path) + + @classmethod + def _render_iface_shared(cls, iface, iface_cfg): +@@ -443,6 +447,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: ++ content.set_section_keypair('main', 'dns', 'none') ++ ++ if len(content) == 0: ++ return None ++ out = "".join([_make_header(), "\n", "\n".join(content.write()), "\n"]) ++ return out ++ + @classmethod + def _render_bridge_interfaces(cls, network_state, iface_contents): + bridge_filter = renderer.filter_by_type('bridge') +@@ -500,6 +519,11 @@ class Renderer(renderer.Renderer): + resolv_content = self._render_dns(network_state, + existing_dns_path=dns_path) + util.write_file(dns_path, resolv_content) ++ if self.networkmanager_conf_path: ++ nm_conf_path = os.path.join(target, self.networkmanager_conf_path) ++ nm_conf_content = self._render_networkmanager_conf(network_state) ++ if nm_conf_content: ++ util.write_file(nm_conf_path, nm_conf_content) + if self.netrules_path: + netrules_content = self._render_persistent_net(network_state) + netrules_path = os.path.join(target, self.netrules_path) +diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py +index 172d6046..379ac8bb 100755 +--- a/tests/unittests/test_net.py ++++ b/tests/unittests/test_net.py +@@ -162,6 +162,13 @@ NETMASK0=0.0.0.0 + ; + nameserver 172.19.0.12 + """.lstrip()), ++ ('etc/NetworkManager/conf.d/99-cloud-init.conf', ++ """ ++# Created by cloud-init on instance boot automatically, do not edit. ++# ++[main] ++dns = none ++""".lstrip()), + ('etc/udev/rules.d/70-persistent-net.rules', + "".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ', + 'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))] +@@ -222,6 +229,13 @@ USERCTL=no + ; + nameserver 172.19.0.12 + """.lstrip()), ++ ('etc/NetworkManager/conf.d/99-cloud-init.conf', ++ """ ++# Created by cloud-init on instance boot automatically, do not edit. ++# ++[main] ++dns = none ++""".lstrip()), + ('etc/udev/rules.d/70-persistent-net.rules', + "".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ', + 'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))] +@@ -304,6 +318,13 @@ USERCTL=no + ; + nameserver 172.19.0.12 + """.lstrip()), ++ ('etc/NetworkManager/conf.d/99-cloud-init.conf', ++ """ ++# Created by cloud-init on instance boot automatically, do not edit. ++# ++[main] ++dns = none ++""".lstrip()), + ('etc/udev/rules.d/70-persistent-net.rules', + "".join(['SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ', + 'ATTR{address}=="fa:16:3e:ed:9a:59", NAME="eth0"\n']))] +-- +2.13.6 + diff --git a/SOURCES/0029-support-loopback-as-a-device-type.patch b/SOURCES/0029-support-loopback-as-a-device-type.patch new file mode 100644 index 0000000..d421ad5 --- /dev/null +++ b/SOURCES/0029-support-loopback-as-a-device-type.patch @@ -0,0 +1,165 @@ +From 4aa2305022e5d42d858102941c51d7186ef8fef9 Mon Sep 17 00:00:00 2001 +From: Scott Moser +Date: Wed, 15 Mar 2017 12:06:40 -0400 +Subject: [PATCH 1/3] support 'loopback' as a device type. + +As reported in bug 1671927, sysconfig had an issue with rendering +a loopback device. The problem was that some as yet unknown issue was +causing the openstack config drive to parse the provided ENI file rather +than reading the network_data.json. Parsing an ENI file would add a +a 'lo' device of type 'physical', and sysconfig was failing to render +that. + +The change here is: + a.) add a 'loopback' type rather than 'physical' for network config. + {'name': 'lo', 'type': 'loopback', 'subnets': ['type': 'loopback']} + b.) support skipping that type in the eni and sysconfig renderers. + c.) make network_state just piggy back on 'physical' renderer for + loopback (this was what was happening before). + +Tests are added for eni and sysconfig renderer. + +(cherry picked from commit 1a2ca7530518d819cbab7287b12f942743427e38) + +Related: rhbz#1540094 +--- + cloudinit/net/eni.py | 16 +++++++++------ + cloudinit/net/network_state.py | 4 ++++ + cloudinit/net/sysconfig.py | 2 ++ + tests/unittests/test_net.py | 44 ++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 60 insertions(+), 6 deletions(-) + +diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py +index b06ffac9..0d5e9712 100644 +--- a/cloudinit/net/eni.py ++++ b/cloudinit/net/eni.py +@@ -265,8 +265,11 @@ def _ifaces_to_net_config_data(ifaces): + # devname is 'eth0' for name='eth0:1' + devname = name.partition(":")[0] + if devname not in devs: +- devs[devname] = {'type': 'physical', 'name': devname, +- 'subnets': []} ++ if devname == "lo": ++ dtype = "loopback" ++ else: ++ dtype = "physical" ++ devs[devname] = {'type': dtype, 'name': devname, 'subnets': []} + # this isnt strictly correct, but some might specify + # hwaddress on a nic for matching / declaring name. + if 'hwaddress' in data: +@@ -418,10 +421,11 @@ class Renderer(renderer.Renderer): + bonding + ''' + order = { +- 'physical': 0, +- 'bond': 1, +- 'bridge': 2, +- 'vlan': 3, ++ 'loopback': 0, ++ 'physical': 1, ++ 'bond': 2, ++ 'bridge': 3, ++ 'vlan': 4, + } + + sections = [] +diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py +index 11ef585b..90b2835a 100644 +--- a/cloudinit/net/network_state.py ++++ b/cloudinit/net/network_state.py +@@ -211,6 +211,10 @@ class NetworkStateInterpreter(object): + exc_info=True) + LOG.debug(self.dump_network_state()) + ++ @ensure_command_keys(['name']) ++ def handle_loopback(self, command): ++ return self.handle_physical(command) ++ + @ensure_command_keys(['name']) + def handle_physical(self, command): + ''' +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index efd101ca..25c29104 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -500,6 +500,8 @@ class Renderer(renderer.Renderer): + '''Given state, return /etc/sysconfig files + contents''' + iface_contents = {} + for iface in network_state.iter_interfaces(): ++ if iface['type'] == "loopback": ++ continue + iface_name = iface['name'] + iface_cfg = NetInterface(iface_name, base_sysconf_dir) + cls._render_iface_shared(iface, iface_cfg) +diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py +index ffa911cc..d75742be 100644 +--- a/tests/unittests/test_net.py ++++ b/tests/unittests/test_net.py +@@ -600,6 +600,14 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true + } + } + ++CONFIG_V1_EXPLICIT_LOOPBACK = { ++ 'version': 1, ++ 'config': [{'name': 'eth0', 'type': 'physical', ++ 'subnets': [{'control': 'auto', 'type': 'dhcp'}]}, ++ {'name': 'lo', 'type': 'loopback', ++ 'subnets': [{'control': 'auto', 'type': 'loopback'}]}, ++ ]} ++ + + def _setup_test(tmp_dir, mock_get_devicelist, mock_read_sys_net, + mock_sys_dev_path): +@@ -770,6 +778,27 @@ USERCTL=no + with open(os.path.join(render_dir, fn)) as fh: + self.assertEqual(expected_content, fh.read()) + ++ def test_config_with_explicit_loopback(self): ++ ns = network_state.parse_net_config_data(CONFIG_V1_EXPLICIT_LOOPBACK) ++ render_dir = self.tmp_path("render") ++ os.makedirs(render_dir) ++ renderer = sysconfig.Renderer() ++ renderer.render_network_state(render_dir, ns) ++ found = dir2dict(render_dir) ++ nspath = '/etc/sysconfig/network-scripts/' ++ self.assertNotIn(nspath + 'ifcfg-lo', found.keys()) ++ expected = """\ ++# Created by cloud-init on instance boot automatically, do not edit. ++# ++BOOTPROTO=dhcp ++DEVICE=eth0 ++NM_CONTROLLED=no ++ONBOOT=yes ++TYPE=Ethernet ++USERCTL=no ++""" ++ self.assertEqual(expected, found[nspath + 'ifcfg-eth0']) ++ + + class TestEniNetRendering(TestCase): + +@@ -811,6 +840,21 @@ iface eth1000 inet dhcp + """ + self.assertEqual(expected.lstrip(), contents.lstrip()) + ++ def test_config_with_explicit_loopback(self): ++ tmp_dir = self.tmp_dir() ++ ns = network_state.parse_net_config_data(CONFIG_V1_EXPLICIT_LOOPBACK) ++ renderer = eni.Renderer() ++ renderer.render_network_state(tmp_dir, ns) ++ expected = """\ ++auto lo ++iface lo inet loopback ++ ++auto eth0 ++iface eth0 inet dhcp ++""" ++ self.assertEqual( ++ expected, dir2dict(tmp_dir)['/etc/network/interfaces']) ++ + + class TestEniNetworkStateToEni(TestCase): + mycfg = { +-- +2.14.3 + diff --git a/SOURCES/0030-Render-the-GATEWAY-value-in-interface-files-which-ha.patch b/SOURCES/0030-Render-the-GATEWAY-value-in-interface-files-which-ha.patch new file mode 100644 index 0000000..c05332b --- /dev/null +++ b/SOURCES/0030-Render-the-GATEWAY-value-in-interface-files-which-ha.patch @@ -0,0 +1,29 @@ +From 6f9c05464a8ed420fb3e2ed71b401ecd1d772bad Mon Sep 17 00:00:00 2001 +From: Ryan McCabe +Date: Tue, 30 Jan 2018 12:37:00 -0500 +Subject: [PATCH 2/3] Render the GATEWAY= value in interface files which have a + gateway in the subnet configuration. + +Resolves: rhbz#1540094 +Signed-off-by: Ryan McCabe +--- + cloudinit/net/sysconfig.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index 25c29104..ca031691 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -347,6 +347,9 @@ class Renderer(renderer.Renderer): + iface_cfg['NETMASK' + str(ipv4_index)] = \ + subnet['netmask'] + ++ if 'gateway' in subnet: ++ iface_cfg['GATEWAY'] = subnet['gateway'] ++ + @classmethod + def _render_subnet_routes(cls, iface_cfg, route_cfg, subnets): + for i, subnet in enumerate(subnets, start=len(iface_cfg.children)): +-- +2.14.3 + diff --git a/SOURCES/0031-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch b/SOURCES/0031-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch new file mode 100644 index 0000000..57c49ba --- /dev/null +++ b/SOURCES/0031-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch @@ -0,0 +1,33 @@ +From 92ab19b85a1cdab73280b679c4a3bd0e32f3d2e2 Mon Sep 17 00:00:00 2001 +From: Ryan McCabe +Date: Mon, 4 Dec 2017 13:43:30 -0500 +Subject: [PATCH 3/3] sysconfig: Don't write BOOTPROTO=dhcp for ipv6 dhcp + +Don't write BOOTPROTO=dhcp for ipv6 dhcp, as BOOTPROTO applies +only to ipv4. Explicitly write IPV6_AUTOCONF=no for dhcp on ipv6. + +X-downstream-only: yes + +Resolves: rhbz#1540093 +Signed-off-by: Ryan McCabe +(cherry picked from commit cbc09ba2f8e6fa967232039e6f6a3363d54ba592) +--- + cloudinit/net/sysconfig.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index ca031691..09df76e3 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -287,7 +287,7 @@ class Renderer(renderer.Renderer): + if subnet_type == 'dhcp6': + iface_cfg['IPV6INIT'] = True + iface_cfg['DHCPV6C'] = True +- iface_cfg['BOOTPROTO'] = 'dhcp' ++ iface_cfg['IPV6_AUTOCONF'] = False + elif subnet_type in ['dhcp4', 'dhcp']: + iface_cfg['BOOTPROTO'] = 'dhcp' + elif subnet_type == 'static': +-- +2.14.3 + diff --git a/SOURCES/0032-sysconfig-Render-IPV6_DEFAULTGW-correctly.patch b/SOURCES/0032-sysconfig-Render-IPV6_DEFAULTGW-correctly.patch new file mode 100644 index 0000000..b4ab937 --- /dev/null +++ b/SOURCES/0032-sysconfig-Render-IPV6_DEFAULTGW-correctly.patch @@ -0,0 +1,64 @@ +From 75fbba4601d09112615c342f88ef7b43fead0508 Mon Sep 17 00:00:00 2001 +From: Ryan McCabe +Date: Fri, 2 Feb 2018 10:25:31 -0500 +Subject: [PATCH] sysconfig: Render IPV6_DEFAULTGW correctly + +Downstream backport of the fixes introduced in upstream commit +97abd83513bee191b58f095f4d683b18acce0b49 which will not apply to +the RHEL 0.7.9 tree. + +Signed-off-by: Ryan McCabe +Resolves: rhbz#1540094 +--- + cloudinit/net/sysconfig.py | 6 +++++- + tests/unittests/test_distros/test_netconfig.py | 4 ++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index 09df76e3..9975fe2c 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -348,7 +348,11 @@ class Renderer(renderer.Renderer): + subnet['netmask'] + + if 'gateway' in subnet: +- iface_cfg['GATEWAY'] = subnet['gateway'] ++ iface_cfg['DEFROUTE'] = True ++ if ":" in subnet['gateway']: ++ iface_cfg['IPV6_DEFAULTGW'] = subnet['gateway'] ++ else: ++ iface_cfg['GATEWAY'] = subnet['gateway'] + + @classmethod + def _render_subnet_routes(cls, iface_cfg, route_cfg, subnets): +diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py +index 861cf8ef..10e25a72 100644 +--- a/tests/unittests/test_distros/test_netconfig.py ++++ b/tests/unittests/test_distros/test_netconfig.py +@@ -257,9 +257,11 @@ NETWORKING=yes + # Created by cloud-init on instance boot automatically, do not edit. + # + BOOTPROTO=none ++DEFROUTE=yes + DEVICE=eth0 + IPADDR=192.168.1.5 + NETMASK=255.255.255.0 ++GATEWAY=192.168.1.254 + ONBOOT=yes + TYPE=Ethernet + USERCTL=no +@@ -394,9 +396,11 @@ IPV6_AUTOCONF=no + # Created by cloud-init on instance boot automatically, do not edit. + # + BOOTPROTO=none ++DEFROUTE=yes + DEVICE=eth0 + IPV6ADDR=2607:f0d0:1002:0011::2/64 + IPV6INIT=yes ++IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 + ONBOOT=yes + TYPE=Ethernet + USERCTL=no +-- +2.14.3 + diff --git a/SOURCES/0033-sysconfig-Render-DNS-and-DOMAIN.patch b/SOURCES/0033-sysconfig-Render-DNS-and-DOMAIN.patch new file mode 100644 index 0000000..3c2c3cc --- /dev/null +++ b/SOURCES/0033-sysconfig-Render-DNS-and-DOMAIN.patch @@ -0,0 +1,86 @@ +From 6f54ccf28a327174df663ea2e07f32d7e632fddd Mon Sep 17 00:00:00 2001 +From: Ryan McCabe +Date: Thu, 15 Feb 2018 10:30:40 -0500 +Subject: [PATCH] sysconfig: Render DNS and DOMAIN + +Currently when dns and dns search info is provided, it is not +rendered when outputting to sysconfig format. + +This patch causes the DNS and DOMAIN lines to be written out rendering +sysconfig. + +This is a backport of upstream commit +bbe91cdc6917adb503b455e6860c21ea7b3f567f which will not apply to the +0.7.9 tree. + +Signed-off-by: Ryan McCabe +Resolves: rhbz#1545525 +--- + cloudinit/net/sysconfig.py | 17 +++++++++++++++++ + tests/unittests/test_net.py | 8 +++++--- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index 9975fe2c..ec412512 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -354,6 +354,23 @@ class Renderer(renderer.Renderer): + else: + iface_cfg['GATEWAY'] = subnet['gateway'] + ++ if 'dns_search' in subnet: ++ if isinstance(subnet['dns_search'], (list, tuple)): ++ # Currently limited to 6 entries per resolv.conf(5) ++ search_list = subnet['dns_search'][:6] ++ iface_cfg['DOMAIN'] = ' '.join(search_list) ++ else: ++ iface_cfg['DOMAIN'] = subnet['dns_search'] ++ ++ if 'dns_nameservers' in subnet: ++ if isinstance(subnet['dns_nameservers'], (list, tuple)): ++ # Currently limited to 3 entries per resolv.conf(5) ++ dns_list = subnet['dns_nameservers'][:3] ++ for i, k in enumerate(dns_list, 1): ++ iface_cfg['DNS' + str(i)] = k ++ else: ++ iface_cfg['DNS1'] = subnet['dns_nameservers'] ++ + @classmethod + def _render_subnet_routes(cls, iface_cfg, route_cfg, subnets): + for i, subnet in enumerate(subnets, start=len(iface_cfg.children)): +diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py +index d75742be..f2a1998a 100644 +--- a/tests/unittests/test_net.py ++++ b/tests/unittests/test_net.py +@@ -780,7 +780,9 @@ USERCTL=no + + def test_config_with_explicit_loopback(self): + ns = network_state.parse_net_config_data(CONFIG_V1_EXPLICIT_LOOPBACK) +- render_dir = self.tmp_path("render") ++ tmp_dir = tempfile.mkdtemp() ++ self.addCleanup(shutil.rmtree, tmp_dir) ++ render_dir = os.path.join(tmp_dir, "render") + os.makedirs(render_dir) + renderer = sysconfig.Renderer() + renderer.render_network_state(render_dir, ns) +@@ -792,7 +794,6 @@ USERCTL=no + # + BOOTPROTO=dhcp + DEVICE=eth0 +-NM_CONTROLLED=no + ONBOOT=yes + TYPE=Ethernet + USERCTL=no +@@ -841,7 +842,8 @@ iface eth1000 inet dhcp + self.assertEqual(expected.lstrip(), contents.lstrip()) + + def test_config_with_explicit_loopback(self): +- tmp_dir = self.tmp_dir() ++ tmp_dir = tempfile.mkdtemp() ++ self.addCleanup(shutil.rmtree, tmp_dir) + ns = network_state.parse_net_config_data(CONFIG_V1_EXPLICIT_LOOPBACK) + renderer = eni.Renderer() + renderer.render_network_state(tmp_dir, ns) +-- +2.14.3 + diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec index 055443b..2eb667e 100644 --- a/SPECS/cloud-init.spec +++ b/SPECS/cloud-init.spec @@ -7,7 +7,7 @@ Name: cloud-init Version: 0.7.9 -Release: 9%{?dist}.2 +Release: 9%{?dist}.6 Summary: Cloud instance init scripts Group: System Environment/Base @@ -49,6 +49,13 @@ Patch0024: 0024-Identify-Brightbox-as-an-Ec2-datasource-user.patch Patch0025: 0025-AliYun-Enable-platform-identification-and-enable-by-.patch Patch0026: 0026-Fix-alibaba-cloud-unit-tests-to-work-with-0.7.9.patch Patch0027: 0027-systemd-create-run-cloud-init-enabled.patch +Patch0028: 0028-net-Allow-for-NetworkManager-configuration.patch +Patch0029: 0029-support-loopback-as-a-device-type.patch +Patch0030: 0030-Render-the-GATEWAY-value-in-interface-files-which-ha.patch +Patch0031: 0031-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch +Patch0032: 0032-sysconfig-Render-IPV6_DEFAULTGW-correctly.patch +Patch0033: 0033-sysconfig-Render-DNS-and-DOMAIN.patch + # Deal with noarch -> arch # https://bugzilla.redhat.com/show_bug.cgi?id=1067089 @@ -184,6 +191,25 @@ fi %config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf %changelog +* Thu Feb 15 2018 Ryan McCabe 0.7.9-9.6 +- Correctly render DNS and DOMAIN for sysconfig + Resolves: rhbz#1545525 + +* Fri Feb 02 2018 Ryan McCabe 0.7.9-9.5 +- sysconfig: Fix rendering of default gateway for ipv6 + Resolves: rhbz#1540094 + +* Tue Jan 30 2018 Ryan McCabe 0.7.9-9.4 +- sysconfig: Fix rendering of default gateway for ipv4 + Resolves: rhbz#1540094 +- sysconfig: Correct rendering for dhcp on ipv6 + Resolves: rhbz#1540093 + +* Mon Jan 22 2018 Ryan McCabe 0.7.9-9.3 +- Disable NetworkManager management of resolv.conf if nameservers + are specified by configuration. + Resolves: rhbz#1537439 + * Thu Dec 21 2017 Ryan McCabe 0.7.9-9.2 - Prevent Azure NM and dhclient hooks from running when cloud-init is disabled (rhbz#1530127)