Accepting request 668094 from Cloud:Tools

- Add cloud-init-no-empty-resolv.patch (bsc#1119397)

- Update to version 18.5 (bsc#1121878, boo#1116767)
  + Remove 
    0001-Fix-the-service-order-for-SUSE-distributions.patch
    0001-Follow-the-ever-bouncing-ball-for-openSUSE-distribut.patch
    0002-Add-tests-for-additional-openSUSE-distro-condition-m.patch
    included upstream
  + Forward port cloud-init-sysconf-ethsetup.patch
  + Add cloud-init-write-routes.patch
  + Add cloud-init-handle-def-route-set.patch
  + tests: add Disco release [Joshua Powers]
  + net: render 'metric' values in per-subnet routes (LP: #1805871)
  + write_files: add support for appending to files. [James Baxter]
  + config: On ubuntu select cloud archive mirrors for armel, armhf, arm64.
    (LP: #1805854)
  + dhclient-hook: cleanups, tests and fix a bug on 'down' event.
  + NoCloud: Allow top level 'network' key in network-config. (LP: #1798117)
  + ovf: Fix ovf network config generation gateway/routes (LP: #1806103)
  + azure: detect vnet migration via netlink media change event
    [Tamilmani Manoharan]
  + Azure: fix copy/paste error in error handling when reading azure ovf.
  + [Adam DePue]
  + tests: fix incorrect order of mocks in test_handle_zfs_root.
  + doc: Change dns_nameserver property to dns_nameservers. [Tomer Cohen]
  + OVF: identify label iso9660 filesystems with label 'OVF ENV'.
  + logs: collect-logs ignore instance-data-sensitive.json on non-root user
    (LP: #1805201)
  + net: Ephemeral*Network: add connectivity check via URL
  + azure: _poll_imds only retry on 404. Fail on Timeout (LP: #1803598)

OBS-URL: https://build.opensuse.org/request/show/668094
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=55
This commit is contained in:
Dominique Leuenberger 2019-01-24 13:15:09 +00:00 committed by Git OBS Bridge
commit 0349f08ea9
11 changed files with 409 additions and 283 deletions

View File

@ -1,28 +0,0 @@
From 1f7950f72dc5f3603118c0f91dca3fb7145f0801 Mon Sep 17 00:00:00 2001
From: Robert Schweikert <rjschwei@suse.com>
Date: Wed, 24 Oct 2018 09:50:11 -0400
Subject: [PATCH] - Fix the service order for SUSE distributions + Network
configuration file gets written when cloud-init.service runs. Therefore
this needs to run prior to the network tools (wicked)
---
systemd/cloud-init.service.tmpl | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl
index b92e8abc..5cb00371 100644
--- a/systemd/cloud-init.service.tmpl
+++ b/systemd/cloud-init.service.tmpl
@@ -14,8 +14,7 @@ After=networking.service
After=network.service
{% endif %}
{% if variant in ["suse"] %}
-Requires=wicked.service
-After=wicked.service
+Before=wicked.service
# setting hostname via hostnamectl depends on dbus, which otherwise
# would not be guaranteed at this point.
After=dbus.service
--
2.13.7

View File

@ -1,40 +0,0 @@
From eb504025c76909175ab2d00c25232b89faf01ab4 Mon Sep 17 00:00:00 2001
From: Robert Schweikert <rjschwei@suse.com>
Date: Sun, 21 Oct 2018 08:28:21 -0400
Subject: [PATCH 1/2] - Follow the ever bouncing ball for openSUSE distribution
identification + openSUSE changed from identifying itself as "opensuse" in
os-release to "opensuse-tumbleweed" and "opensuse-leap". This breaks
template expansion
---
cloudinit/util.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cloudinit/util.py b/cloudinit/util.py
index c67d6be6..7800f7bc 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -615,8 +615,8 @@ def get_linux_distro():
distro_name = os_release.get('ID', '')
distro_version = os_release.get('VERSION_ID', '')
if 'sles' in distro_name or 'suse' in distro_name:
- # RELEASE_BLOCKER: We will drop this sles ivergent behavior in
- # before 18.4 so that get_linux_distro returns a named tuple
+ # RELEASE_BLOCKER: We will drop this sles divergent behavior in
+ # the future so that get_linux_distro returns a named tuple
# which will include both version codename and architecture
# on all distributions.
flavor = platform.machine()
@@ -668,7 +668,8 @@ def system_info():
var = 'ubuntu'
elif linux_dist == 'redhat':
var = 'rhel'
- elif linux_dist in ('opensuse', 'sles'):
+ elif linux_dist in (
+ 'opensuse', 'opensuse-tumbleweed', 'opensuse-leap', 'sles'):
var = 'suse'
else:
var = 'linux'
--
2.13.7

View File

@ -1,109 +0,0 @@
From 33d988113c3897ea7e0d1eda402d30dfec119602 Mon Sep 17 00:00:00 2001
From: Robert Schweikert <rjschwei@suse.com>
Date: Sun, 21 Oct 2018 08:46:15 -0400
Subject: [PATCH 2/2] - Add tests for additional openSUSE distro condition
mechanisms
---
cloudinit/tests/test_util.py | 75 ++++++++++++++++++++++++++++++++++----------
1 file changed, 59 insertions(+), 16 deletions(-)
diff --git a/cloudinit/tests/test_util.py b/cloudinit/tests/test_util.py
index 749a3846..c3f52c7b 100644
--- a/cloudinit/tests/test_util.py
+++ b/cloudinit/tests/test_util.py
@@ -18,25 +18,51 @@ MOUNT_INFO = [
]
OS_RELEASE_SLES = dedent("""\
- NAME="SLES"\n
- VERSION="12-SP3"\n
- VERSION_ID="12.3"\n
- PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3"\n
- ID="sles"\nANSI_COLOR="0;32"\n
- CPE_NAME="cpe:/o:suse:sles:12:sp3"\n
+ NAME="SLES"
+ VERSION="12-SP3"
+ VERSION_ID="12.3"
+ PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3"
+ ID="sles"
+ ANSI_COLOR="0;32"
+ CPE_NAME="cpe:/o:suse:sles:12:sp3"
""")
OS_RELEASE_OPENSUSE = dedent("""\
-NAME="openSUSE Leap"
-VERSION="42.3"
-ID=opensuse
-ID_LIKE="suse"
-VERSION_ID="42.3"
-PRETTY_NAME="openSUSE Leap 42.3"
-ANSI_COLOR="0;32"
-CPE_NAME="cpe:/o:opensuse:leap:42.3"
-BUG_REPORT_URL="https://bugs.opensuse.org"
-HOME_URL="https://www.opensuse.org/"
+ NAME="openSUSE Leap"
+ VERSION="42.3"
+ ID=opensuse
+ ID_LIKE="suse"
+ VERSION_ID="42.3"
+ PRETTY_NAME="openSUSE Leap 42.3"
+ ANSI_COLOR="0;32"
+ CPE_NAME="cpe:/o:opensuse:leap:42.3"
+ BUG_REPORT_URL="https://bugs.opensuse.org"
+ HOME_URL="https://www.opensuse.org/"
+""")
+
+OS_RELEASE_OPENSUSE_L15 = dedent("""\
+ NAME="openSUSE Leap"
+ VERSION="15.0"
+ ID="opensuse-leap"
+ ID_LIKE="suse opensuse"
+ VERSION_ID="15.0"
+ PRETTY_NAME="openSUSE Leap 15.0"
+ ANSI_COLOR="0;32"
+ CPE_NAME="cpe:/o:opensuse:leap:15.0"
+ BUG_REPORT_URL="https://bugs.opensuse.org"
+ HOME_URL="https://www.opensuse.org/"
+""")
+
+OS_RELEASE_OPENSUSE_TW = dedent("""\
+ NAME="openSUSE Tumbleweed"
+ ID="opensuse-tumbleweed"
+ ID_LIKE="opensuse suse"
+ VERSION_ID="20180920"
+ PRETTY_NAME="openSUSE Tumbleweed"
+ ANSI_COLOR="0;32"
+ CPE_NAME="cpe:/o:opensuse:tumbleweed:20180920"
+ BUG_REPORT_URL="https://bugs.opensuse.org"
+ HOME_URL="https://www.opensuse.org/"
""")
OS_RELEASE_CENTOS = dedent("""\
@@ -453,6 +479,23 @@ class TestGetLinuxDistro(CiTestCase):
dist = util.get_linux_distro()
self.assertEqual(('opensuse', '42.3', platform.machine()), dist)
+ @mock.patch('cloudinit.util.load_file')
+ def test_get_linux_opensuse_l15(self, m_os_release, m_path_exists):
+ """Verify we get the correct name and machine arch on OpenSUSE."""
+ m_os_release.return_value = OS_RELEASE_OPENSUSE_L15
+ m_path_exists.side_effect = TestGetLinuxDistro.os_release_exists
+ dist = util.get_linux_distro()
+ self.assertEqual(('opensuse-leap', '15.0', platform.machine()), dist)
+
+ @mock.patch('cloudinit.util.load_file')
+ def test_get_linux_opensuse_tw(self, m_os_release, m_path_exists):
+ """Verify we get the correct name and machine arch on OpenSUSE."""
+ m_os_release.return_value = OS_RELEASE_OPENSUSE_TW
+ m_path_exists.side_effect = TestGetLinuxDistro.os_release_exists
+ dist = util.get_linux_distro()
+ self.assertEqual(
+ ('opensuse-tumbleweed', '20180920', platform.machine()), dist)
+
@mock.patch('platform.dist')
def test_get_linux_distro_no_data(self, m_platform_dist, m_path_exists):
"""Verify we get no information if os-release does not exist"""
--
2.13.7

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f19b969dbf2bda771a6a41fdb22b79b163b8a3b81cf1a45036d17993789bef7f
size 965107

3
cloud-init-18.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:650d1eb38ea488b3ea8cc9d7b0fb975bb3c9a3e5ca7dcaf924892f5f9813da92
size 990381

View File

@ -0,0 +1,189 @@
--- cloudinit/net/network_state.py.orig
+++ cloudinit/net/network_state.py
@@ -148,6 +148,7 @@ class NetworkState(object):
self._network_state = copy.deepcopy(network_state)
self._version = version
self.use_ipv6 = network_state.get('use_ipv6', False)
+ self._has_default_route = self._find_default_route()
@property
def config(self):
@@ -157,6 +158,10 @@ class NetworkState(object):
def version(self):
return self._version
+ @property
+ def has_default_route(self):
+ return self._has_default_route
+
def iter_routes(self, filter_func=None):
for route in self._network_state.get('routes', []):
if filter_func is not None:
@@ -188,6 +193,23 @@ class NetworkState(object):
if filter_func(iface):
yield iface
+ def _find_default_route(self):
+ for route in self.iter_routes():
+ if self._is_default_route(route):
+ return True
+ for iface in self.iter_interfaces():
+ for subnet in iface.get('subnets', []):
+ for route in subnet.get('routes', []):
+ if self._is_default_route(route):
+ return True
+
+ def _is_default_route(self, route):
+ default_nets = ('::', '0.0.0.0')
+ return (
+ route.get('prefix') == 0 and
+ route.get('network') in default_nets
+ )
+
@six.add_metaclass(CommandHandlerMeta)
class NetworkStateInterpreter(object):
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -310,6 +310,7 @@ class Renderer(renderer.Renderer):
mtu_key = 'MTU'
subnet_type = subnet.get('type')
if subnet_type == 'dhcp6':
+ # TODO need to set BOOTPROTO to dhcp6 on SUSE
iface_cfg['IPV6INIT'] = True
iface_cfg['DHCPV6C'] = True
elif subnet_type in ['dhcp4', 'dhcp']:
@@ -355,9 +356,12 @@ class Renderer(renderer.Renderer):
ipv6_index = -1
for i, subnet in enumerate(subnets, start=len(iface_cfg.children)):
subnet_type = subnet.get('type')
- if subnet_type == 'dhcp6':
- continue
- elif subnet_type in ['dhcp4', 'dhcp']:
+ if subnet_type in ['dhcp', 'dhcp4', 'dhcp6']:
+ if (
+ cls._network_default_route and
+ iface_cfg['BOOTPROTO'] != 'none'
+ ):
+ iface_cfg['DHCLIENT_SET_DEFAULT_ROUTE'] = False
continue
elif subnet_type == 'static':
if subnet_is_ipv6(subnet):
@@ -423,6 +427,8 @@ class Renderer(renderer.Renderer):
# TODO(harlowja): add validation that no other iface has
# also provided the default route?
iface_cfg['DEFROUTE'] = True
+ if iface_cfg['BOOTPROTO'] in ('dhcp', 'dhcp4', 'dhcp6'):
+ iface_cfg['DHCLIENT_SET_DEFAULT_ROUTE'] = True
if 'gateway' in route:
if is_ipv6 or is_ipv6_addr(route['gateway']):
iface_cfg['IPV6_DEFAULTGW'] = route['gateway']
@@ -636,6 +642,10 @@ class Renderer(renderer.Renderer):
return contents
def render_network_state(self, network_state, templates=None, target=None):
+ # Force the knowledge of a default route for the network state
+ # into the renderer, this is needed to write the proper ifcfg-
+ # on SUSE distros
+ self.__class__._network_default_route = network_state.has_default_route
if not templates:
templates = self.templates
file_mode = 0o644
--- tests/unittests/test_net.py.orig
+++ tests/unittests/test_net.py
@@ -538,6 +538,7 @@ NETWORK_CONFIGS = {
BOOTPROTO=dhcp
DEFROUTE=yes
DEVICE=eth99
+ DHCLIENT_SET_DEFAULT_ROUTE=yes
DNS1=8.8.8.8
DNS2=8.8.4.4
DOMAIN="barley.maas sach.maas"
@@ -912,6 +913,7 @@ pre-down route del -net 10.0.0.0 netmask
'ifcfg-bond0.200': textwrap.dedent("""\
BOOTPROTO=dhcp
DEVICE=bond0.200
+ DHCLIENT_SET_DEFAULT_ROUTE=no
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
@@ -1011,6 +1013,7 @@ pre-down route del -net 10.0.0.0 netmask
'ifcfg-eth5': textwrap.dedent("""\
BOOTPROTO=dhcp
DEVICE=eth5
+ DHCLIENT_SET_DEFAULT_ROUTE=no
HWADDR=98:bb:9f:2c:e8:8a
NM_CONTROLLED=no
ONBOOT=no
@@ -1666,6 +1669,23 @@ CONFIG_V1_SIMPLE_SUBNET = {
'type': 'static'}],
'type': 'physical'}]}
+CONFIG_V1_MULTI_IFACE = {
+ 'version': 1,
+ 'config': [{'type': 'physical',
+ 'mtu': 1500,
+ 'subnets': [{'type': 'static',
+ 'netmask': '255.255.240.0',
+ 'routes': [{'netmask': '0.0.0.0',
+ 'network': '0.0.0.0',
+ 'gateway': '51.68.80.1'}],
+ 'address': '51.68.89.122',
+ 'ipv4': True}],
+ 'mac_address': 'fa:16:3e:25:b4:59',
+ 'name': 'eth0'},
+ {'type': 'physical',
+ 'mtu': 9000,
+ 'subnets': [{'type': 'dhcp4'}],
+ 'mac_address': 'fa:16:3e:b1:ca:29', 'name': 'eth1'}]}
DEFAULT_DEV_ATTRS = {
'eth1000': {
@@ -2133,6 +2153,47 @@ USERCTL=no
"""
self.assertEqual(expected, found[nspath + 'ifcfg-interface0'])
+ def test_network_config_v1_multi_iface_samples(self):
+ ns = network_state.parse_net_config_data(CONFIG_V1_MULTI_IFACE)
+ render_dir = self.tmp_path("render")
+ os.makedirs(render_dir)
+ renderer = self._get_renderer()
+ renderer.render_network_state(ns, target=render_dir)
+ found = dir2dict(render_dir)
+ nspath = '/etc/sysconfig/network-scripts/'
+ self.assertNotIn(nspath + 'ifcfg-lo', found.keys())
+ expected_i1 = """\
+# Created by cloud-init on instance boot automatically, do not edit.
+#
+BOOTPROTO=none
+DEFROUTE=yes
+DEVICE=eth0
+GATEWAY=51.68.80.1
+HWADDR=fa:16:3e:25:b4:59
+IPADDR=51.68.89.122
+MTU=1500
+NETMASK=255.255.240.0
+NM_CONTROLLED=no
+ONBOOT=yes
+TYPE=Ethernet
+USERCTL=no
+"""
+ self.assertEqual(expected_i1, found[nspath + 'ifcfg-eth0'])
+ expected_i2 = """\
+# Created by cloud-init on instance boot automatically, do not edit.
+#
+BOOTPROTO=dhcp
+DEVICE=eth1
+DHCLIENT_SET_DEFAULT_ROUTE=no
+HWADDR=fa:16:3e:b1:ca:29
+MTU=9000
+NM_CONTROLLED=no
+ONBOOT=yes
+TYPE=Ethernet
+USERCTL=no
+"""
+ self.assertEqual(expected_i2, found[nspath + 'ifcfg-eth1'])
+
def test_config_with_explicit_loopback(self):
ns = network_state.parse_net_config_data(CONFIG_V1_EXPLICIT_LOOPBACK)
render_dir = self.tmp_path("render")

View File

@ -0,0 +1,21 @@
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -545,6 +545,8 @@ class Renderer(renderer.Renderer):
content.add_nameserver(nameserver)
for searchdomain in network_state.dns_searchdomains:
content.add_search_domain(searchdomain)
+ if not str(content):
+ return str(content)
header = _make_header(';')
content_str = str(content)
if not content_str.startswith(header):
@@ -658,7 +660,8 @@ class Renderer(renderer.Renderer):
dns_path = util.target_path(target, self.dns_path)
resolv_content = self._render_dns(network_state,
existing_dns_path=dns_path)
- util.write_file(dns_path, resolv_content, file_mode)
+ if resolv_content:
+ util.write_file(dns_path, resolv_content, file_mode)
if self.networkmanager_conf_path:
nm_conf_path = util.target_path(target,
self.networkmanager_conf_path)

View File

@ -1,20 +1,6 @@
From 6732e10fa677566a2ddcbc7ff6727cf697d35761 Mon Sep 17 00:00:00 2001 --- cloudinit/net/sysconfig.py.orig
From: Robert Schweikert <rjschwei@suse.com> +++ cloudinit/net/sysconfig.py
Date: Tue, 23 Oct 2018 12:37:19 -0400 @@ -252,6 +252,7 @@ class Renderer(renderer.Renderer):
Subject: [PATCH] - Follow up to db50bc0d9 + ONBOOT is not recognized on
openSUSE and SUSE Linux Enterprise, add the STARTMODE setting
---
cloudinit/net/sysconfig.py | 2 +
.../unittests/test_distros/test_netconfig.py | 8 ++++
tests/unittests/test_net.py | 40 +++++++++++++++++++
3 files changed, 50 insertions(+)
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index 9c16d3a7..ff847038 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -242,6 +242,7 @@ class Renderer(renderer.Renderer):
('USERCTL', False), ('USERCTL', False),
('NM_CONTROLLED', False), ('NM_CONTROLLED', False),
('BOOTPROTO', 'none'), ('BOOTPROTO', 'none'),
@ -22,7 +8,7 @@ index 9c16d3a7..ff847038 100644
]) ])
# If these keys exist, then their values will be used to form # If these keys exist, then their values will be used to form
@@ -336,6 +337,7 @@ class Renderer(renderer.Renderer): @@ -346,6 +347,7 @@ class Renderer(renderer.Renderer):
iface_cfg.name)) iface_cfg.name))
if subnet.get('control') == 'manual': if subnet.get('control') == 'manual':
iface_cfg['ONBOOT'] = False iface_cfg['ONBOOT'] = False
@ -30,11 +16,9 @@ index 9c16d3a7..ff847038 100644
# set IPv4 and IPv6 static addresses # set IPv4 and IPv6 static addresses
ipv4_index = -1 ipv4_index = -1
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py --- tests/unittests/test_distros/test_netconfig.py.orig
index 6e339355..e986b593 100644 +++ tests/unittests/test_distros/test_netconfig.py
--- a/tests/unittests/test_distros/test_netconfig.py @@ -468,6 +468,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
+++ b/tests/unittests/test_distros/test_netconfig.py
@@ -468,6 +468,7 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -42,7 +26,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -476,6 +477,7 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): @@ -476,6 +477,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
DEVICE=eth1 DEVICE=eth1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -50,7 +34,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -499,6 +501,7 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): @@ -499,6 +501,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -58,7 +42,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -507,6 +510,7 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): @@ -507,6 +510,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
DEVICE=eth1 DEVICE=eth1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -66,7 +50,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -559,6 +563,7 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): @@ -559,6 +563,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -74,7 +58,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -567,6 +572,7 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): @@ -567,6 +572,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
DEVICE=eth1 DEVICE=eth1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -82,7 +66,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -587,6 +593,7 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): @@ -587,6 +593,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -90,7 +74,7 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -595,6 +602,7 @@ class TestNetCfgDistroOpensuse(TestNetCfgDistroBase): @@ -595,6 +602,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
DEVICE=eth1 DEVICE=eth1
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -98,10 +82,8 @@ index 6e339355..e986b593 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py --- tests/unittests/test_net.py.orig
index 8e383739..d94b9430 100644 +++ tests/unittests/test_net.py
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -144,6 +144,7 @@ IPADDR=172.19.1.34 @@ -144,6 +144,7 @@ IPADDR=172.19.1.34
NETMASK=255.255.252.0 NETMASK=255.255.252.0
NM_CONTROLLED=no NM_CONTROLLED=no
@ -150,7 +132,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""".lstrip()), """.lstrip()),
@@ -524,6 +530,7 @@ NETWORK_CONFIGS = { @@ -525,6 +531,7 @@ NETWORK_CONFIGS = {
HWADDR=cf:d6:af:48:e8:80 HWADDR=cf:d6:af:48:e8:80
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -158,15 +140,15 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
'ifcfg-eth99': textwrap.dedent("""\ 'ifcfg-eth99': textwrap.dedent("""\
@@ -539,6 +546,7 @@ NETWORK_CONFIGS = { @@ -541,6 +548,7 @@ NETWORK_CONFIGS = {
NETMASK=255.255.255.0 METRIC=10000
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
+ STARTMODE=auto + STARTMODE=auto
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
}, },
@@ -652,6 +660,7 @@ NETWORK_CONFIGS = { @@ -654,6 +662,7 @@ NETWORK_CONFIGS = {
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -174,7 +156,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
MTU=9000 MTU=9000
@@ -691,6 +700,7 @@ NETWORK_CONFIGS = { @@ -693,6 +702,7 @@ NETWORK_CONFIGS = {
DEVICE=iface0 DEVICE=iface0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -182,7 +164,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -894,6 +904,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -896,6 +906,7 @@ pre-down route del -net 10.0.0.0 netmask
MACADDR=aa:bb:cc:dd:ee:ff MACADDR=aa:bb:cc:dd:ee:ff
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -190,23 +172,23 @@ index 8e383739..d94b9430 100644
TYPE=Bond TYPE=Bond
USERCTL=no"""), USERCTL=no"""),
'ifcfg-bond0.200': textwrap.dedent("""\ 'ifcfg-bond0.200': textwrap.dedent("""\
@@ -902,6 +913,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -903,6 +914,7 @@ pre-down route del -net 10.0.0.0 netmask
DEVICE=bond0.200
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
PHYSDEV=bond0
+ STARTMODE=auto + STARTMODE=auto
PHYSDEV=bond0
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
VLAN=yes"""), @@ -920,6 +932,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -919,6 +931,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
PRIO=22
+ STARTMODE=auto + STARTMODE=auto
PRIO=22
STP=no STP=no
TYPE=Bridge TYPE=Bridge
USERCTL=no"""), @@ -930,6 +943,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -928,6 +941,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
HWADDR=c0:d6:9f:2c:e8:80 HWADDR=c0:d6:9f:2c:e8:80
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -214,15 +196,15 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
'ifcfg-eth0.101': textwrap.dedent("""\ 'ifcfg-eth0.101': textwrap.dedent("""\
@@ -946,6 +960,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -947,6 +961,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
PHYSDEV=eth0
+ STARTMODE=auto + STARTMODE=auto
PHYSDEV=eth0
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
VLAN=yes"""), @@ -958,6 +973,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -956,6 +971,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
MASTER=bond0 MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -230,7 +212,7 @@ index 8e383739..d94b9430 100644
SLAVE=yes SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
@@ -966,6 +982,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -968,6 +984,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0 MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -238,7 +220,7 @@ index 8e383739..d94b9430 100644
SLAVE=yes SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
@@ -976,6 +993,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -978,6 +995,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=66:bb:9f:2c:e8:80 HWADDR=66:bb:9f:2c:e8:80
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -246,7 +228,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
'ifcfg-eth4': textwrap.dedent("""\ 'ifcfg-eth4': textwrap.dedent("""\
@@ -985,6 +1003,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -987,6 +1005,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=98:bb:9f:2c:e8:80 HWADDR=98:bb:9f:2c:e8:80
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -254,7 +236,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
'ifcfg-eth5': textwrap.dedent("""\ 'ifcfg-eth5': textwrap.dedent("""\
@@ -993,6 +1012,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -995,6 +1014,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=98:bb:9f:2c:e8:8a HWADDR=98:bb:9f:2c:e8:8a
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=no ONBOOT=no
@ -262,7 +244,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no""") USERCTL=no""")
}, },
@@ -1282,6 +1302,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1306,6 +1326,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0 NETMASK1=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -270,23 +252,23 @@ index 8e383739..d94b9430 100644
TYPE=Bond TYPE=Bond
USERCTL=no USERCTL=no
"""), """),
@@ -1293,6 +1314,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1316,6 +1337,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
SLAVE=yes
+ STARTMODE=auto + STARTMODE=auto
SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), @@ -1332,6 +1354,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1309,6 +1331,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
SLAVE=yes
+ STARTMODE=auto + STARTMODE=auto
SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), @@ -1358,6 +1381,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1334,6 +1357,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
NETMASK1=255.255.255.0 NETMASK1=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -294,23 +276,23 @@ index 8e383739..d94b9430 100644
TYPE=Bond TYPE=Bond
USERCTL=no USERCTL=no
"""), """),
@@ -1345,6 +1369,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1368,6 +1392,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
SLAVE=yes
+ STARTMODE=auto + STARTMODE=auto
SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), @@ -1390,6 +1415,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1363,6 +1388,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true MASTER=bond0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
SLAVE=yes
+ STARTMODE=auto + STARTMODE=auto
SLAVE=yes
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), @@ -1428,6 +1454,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1400,6 +1426,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
HWADDR=aa:bb:cc:dd:e8:00 HWADDR=aa:bb:cc:dd:e8:00
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -318,23 +300,23 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no"""), USERCTL=no"""),
'ifcfg-en0.99': textwrap.dedent("""\ 'ifcfg-en0.99': textwrap.dedent("""\
@@ -1418,6 +1445,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1445,6 +1472,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
PHYSDEV=en0
+ STARTMODE=auto + STARTMODE=auto
PHYSDEV=en0
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
VLAN=yes"""), @@ -1486,6 +1514,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1459,6 +1487,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
PRIO=22
+ STARTMODE=auto + STARTMODE=auto
PRIO=22
STP=no STP=no
TYPE=Bridge TYPE=Bridge
USERCTL=no @@ -1500,6 +1529,7 @@ pre-down route del -net 10.0.0.0 netmask
@@ -1472,6 +1501,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
IPV6INIT=yes IPV6INIT=yes
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -342,7 +324,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -1484,6 +1514,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1512,6 +1542,7 @@ pre-down route del -net 10.0.0.0 netmask
IPV6INIT=yes IPV6INIT=yes
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -350,7 +332,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -1558,6 +1589,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1586,6 +1617,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=no ONBOOT=no
@ -358,7 +340,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -1568,6 +1600,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1596,6 +1628,7 @@ pre-down route del -net 10.0.0.0 netmask
MTU=1480 MTU=1480
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -366,7 +348,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -1577,6 +1610,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true @@ -1605,6 +1638,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=52:54:00:12:34:ff HWADDR=52:54:00:12:34:ff
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=no ONBOOT=no
@ -374,7 +356,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
"""), """),
@@ -1933,6 +1967,7 @@ DEVICE=eth1000 @@ -1971,6 +2005,7 @@ DEVICE=eth1000
HWADDR=07-1C-C6-75-A4-BE HWADDR=07-1C-C6-75-A4-BE
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -382,7 +364,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""".lstrip() """.lstrip()
@@ -2054,6 +2089,7 @@ IPADDR=10.0.2.15 @@ -2092,6 +2127,7 @@ IPADDR=10.0.2.15
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -390,7 +372,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""" """
@@ -2075,6 +2111,7 @@ BOOTPROTO=dhcp @@ -2113,6 +2149,7 @@ BOOTPROTO=dhcp
DEVICE=eth0 DEVICE=eth0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -398,7 +380,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""" """
@@ -2222,6 +2259,7 @@ DEVICE=eth1000 @@ -2260,6 +2297,7 @@ DEVICE=eth1000
HWADDR=07-1C-C6-75-A4-BE HWADDR=07-1C-C6-75-A4-BE
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -406,7 +388,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""".lstrip() """.lstrip()
@@ -2343,6 +2381,7 @@ IPADDR=10.0.2.15 @@ -2381,6 +2419,7 @@ IPADDR=10.0.2.15
NETMASK=255.255.255.0 NETMASK=255.255.255.0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -414,7 +396,7 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""" """
@@ -2364,6 +2403,7 @@ BOOTPROTO=dhcp @@ -2402,6 +2441,7 @@ BOOTPROTO=dhcp
DEVICE=eth0 DEVICE=eth0
NM_CONTROLLED=no NM_CONTROLLED=no
ONBOOT=yes ONBOOT=yes
@ -422,6 +404,3 @@ index 8e383739..d94b9430 100644
TYPE=Ethernet TYPE=Ethernet
USERCTL=no USERCTL=no
""" """
--
2.19.0

View File

@ -0,0 +1,43 @@
--- cloudinit/distros/opensuse.py.orig
+++ cloudinit/distros/opensuse.py
@@ -172,8 +172,40 @@ class Distro(distros.Distro):
util.write_file(out_fn, str(conf), 0o644)
def _write_network_config(self, netconfig):
+ self._write_routes(netconfig)
return self._supported_write_network_config(netconfig)
+ def _write_routes(self, netconfig):
+ """Write route files, not part of the standard distro interface"""
+ # Due to the implementation of the sysconfig renderer default routes
+ # are setup in ifcfg-* files. But this does not work on SLES or
+ # openSUSE https://bugs.launchpad.net/cloud-init/+bug/1812117
+ # this is a very hacky way to get around the problem until a real
+ # solution is found in the sysconfig renderer
+ device_configs = netconfig.get('config', [])
+ default_nets = ('::', '0.0.0.0')
+ for config in device_configs:
+ if_name = config.get('name')
+ subnets = config.get('subnets', [])
+ for subnet in subnets:
+ routes = subnet.get('routes', [])
+ config_routes = ''
+ for route in routes:
+ dest = route.get('network')
+ if dest in default_nets:
+ dest = 'default'
+ gateway = route.get('gateway')
+ config_routes += ' '.join([dest, gateway])
+ if dest != 'default':
+ config_routes += ' ' + route.get('netmask', '')
+ else:
+ config_routes += ' -'
+ config_routes += ' - -'
+ config_routes += '\n'
+ if config_routes:
+ route_file = '/etc/sysconfig/network/ifroute-%s' % if_name
+ util.write_file(route_file, config_routes)
+
@property
def preferred_ntp_clients(self):
"""The preferred ntp client is dependent on the version."""

View File

@ -1,3 +1,73 @@
-------------------------------------------------------------------
Tue Jan 22 13:04:40 UTC 2019 - Robert Schweikert <rjschwei@suse.com>
- Add cloud-init-no-empty-resolv.patch (bsc#1119397)
-------------------------------------------------------------------
Mon Jan 7 20:22:39 UTC 2019 - Robert Schweikert <rjschwei@suse.com>
- Update to version 18.5 (bsc#1121878, boo#1116767)
+ Remove
0001-Fix-the-service-order-for-SUSE-distributions.patch
0001-Follow-the-ever-bouncing-ball-for-openSUSE-distribut.patch
0002-Add-tests-for-additional-openSUSE-distro-condition-m.patch
included upstream
+ Forward port cloud-init-sysconf-ethsetup.patch
+ Add cloud-init-write-routes.patch
+ Add cloud-init-handle-def-route-set.patch
+ tests: add Disco release [Joshua Powers]
+ net: render 'metric' values in per-subnet routes (LP: #1805871)
+ write_files: add support for appending to files. [James Baxter]
+ config: On ubuntu select cloud archive mirrors for armel, armhf, arm64.
(LP: #1805854)
+ dhclient-hook: cleanups, tests and fix a bug on 'down' event.
+ NoCloud: Allow top level 'network' key in network-config. (LP: #1798117)
+ ovf: Fix ovf network config generation gateway/routes (LP: #1806103)
+ azure: detect vnet migration via netlink media change event
[Tamilmani Manoharan]
+ Azure: fix copy/paste error in error handling when reading azure ovf.
+ [Adam DePue]
+ tests: fix incorrect order of mocks in test_handle_zfs_root.
+ doc: Change dns_nameserver property to dns_nameservers. [Tomer Cohen]
+ OVF: identify label iso9660 filesystems with label 'OVF ENV'.
+ logs: collect-logs ignore instance-data-sensitive.json on non-root user
(LP: #1805201)
+ net: Ephemeral*Network: add connectivity check via URL
+ azure: _poll_imds only retry on 404. Fail on Timeout (LP: #1803598)
+ resizefs: Prefix discovered devpath with '/dev/' when path does not
exist [Igor Galić]
+ azure: retry imds polling on requests.Timeout (LP: #1800223)
+ azure: Accept variation in error msg from mount for ntfs volumes
[Jason Zions] (LP: #1799338)
+ azure: fix regression introduced when persisting ephemeral dhcp lease
[asakkurr]
+ azure: add udev rules to create cloud-init Gen2 disk name symlinks
(LP: #1797480)
+ tests: ec2 mock missing httpretty user-data and instance-identity routes
+ azure: remove /etc/netplan/90-hotplug-azure.yaml when net from IMDS
+ azure: report ready to fabric after reprovision and reduce logging
[asakkurr] (LP: #1799594)
+ query: better error when missing read permission on instance-data
+ instance-data: fallback to instance-data.json if sensitive is absent.
(LP: #1798189)
+ docs: remove colon from network v1 config example. [Tomer Cohen]
+ Add cloud-id binary to packages for SUSE [Jason Zions]
+ systemd: On SUSE ensure cloud-init.service runs before wicked
[Robert Schweikert] (LP: #1799709)
+ update detection of openSUSE variants [Robert Schweikert]
+ azure: Add apply_network_config option to disable network from IMDS
(LP: #1798424)
+ Correct spelling in an error message (udevadm). [Katie McLaughlin]
+ tests: meta_data key changed to meta-data in ec2 instance-data.json
(LP: #1797231)
+ tests: fix kvm integration test to assert flexible config-disk path
(LP: #1797199)
+ tools: Add cloud-id command line utility
+ instance-data: Add standard keys platform and subplatform. Refactor ec2.
+ net: ignore nics that have "zero" mac address. (LP: #1796917)
+ tests: fix apt_configure_primary to be more flexible
+ Ubuntu: update sources.list to comment out deb-src entries. (LP: #74747)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 2 14:13:42 UTC 2018 - Robert Schweikert <rjschwei@suse.com> Fri Nov 2 14:13:42 UTC 2018 - Robert Schweikert <rjschwei@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package cloud-init # spec file for package cloud-init
# #
# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,7 @@
%global configver 0.7 %global configver 0.7
Name: cloud-init Name: cloud-init
Version: 18.4 Version: 18.5
Release: 0 Release: 0
License: GPL-3.0 and AGPL-3.0 License: GPL-3.0 and AGPL-3.0
Summary: Cloud node initialization tool Summary: Cloud node initialization tool
@ -37,22 +37,22 @@ Patch20: cloud-init-python2-sigpipe.patch
Patch21: cloud-init-template-py2.patch Patch21: cloud-init-template-py2.patch
Patch29: datasourceLocalDisk.patch Patch29: datasourceLocalDisk.patch
Patch34: cloud-init-tests-set-exec.patch Patch34: cloud-init-tests-set-exec.patch
# FIXME
# https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/357644
Patch36: 0001-Follow-the-ever-bouncing-ball-for-openSUSE-distribut.patch
Patch37: 0002-Add-tests-for-additional-openSUSE-distro-condition-m.patch
# FIXME no proposed solution # FIXME no proposed solution
Patch38: cloud-init-sysconf-path.patch Patch38: cloud-init-sysconf-path.patch
# FIXME (lp#1799540) # FIXME (lp#1799540)
# https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/357710 # https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/357710
Patch39: cloud-init-sysconf-ethsetup.patch Patch39: cloud-init-sysconf-ethsetup.patch
# FIXME (lp#1799709)
# https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/357752
Patch40: 0001-Fix-the-service-order-for-SUSE-distributions.patch
# FIXME (lp# 1800854) # FIXME (lp# 1800854)
Patch41: cloud-init-static-net.patch Patch41: cloud-init-static-net.patch
# FIXME (lp#1801364) # FIXME (lp#1801364)
Patch42: cloud-init-ostack-metadat-dencode.patch Patch42: cloud-init-ostack-metadat-dencode.patch
# FIXME (lp#1812117)
Patch43: cloud-init-write-routes.patch
# Following submitted upstream
Patch44: cloud-init-handle-def-route-set.patch
# End lp#1812117
# FIXME (lp#1812853)
Patch45: cloud-init-no-empty-resolv.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: filesystem BuildRequires: filesystem
@ -193,13 +193,13 @@ Documentation and examples for cloud-init tools
%endif %endif
%patch29 -p0 %patch29 -p0
%patch34 %patch34
%patch36 -p1
%patch37 -p1
%patch38 %patch38
%patch39 -p1 %patch39
%patch40 -p1
%patch41 %patch41
%patch42 %patch42
%patch43
%patch44
%patch45
%build %build
%if 0%{?suse_version} && 0%{?suse_version} <= 1315 %if 0%{?suse_version} && 0%{?suse_version} <= 1315
@ -289,6 +289,7 @@ popd
%defattr(-,root,root) %defattr(-,root,root)
# do not mark as doc or we get conflicts with the doc package # do not mark as doc or we get conflicts with the doc package
%{docdir}/LICENSE %{docdir}/LICENSE
%{_bindir}/cloud-id
%{_bindir}/cloud-init %{_bindir}/cloud-init
%{_bindir}/cloud-init-per %{_bindir}/cloud-init-per
%dir %{_sysconfdir}/cloud %dir %{_sysconfdir}/cloud