SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-sysconf-ethsetup.patch
Robert Schweikert 1064b17095 - 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
  + 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)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=125
2019-01-18 09:50:54 +00:00

407 lines
12 KiB
Diff

--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -252,6 +252,7 @@ class Renderer(renderer.Renderer):
('USERCTL', False),
('NM_CONTROLLED', False),
('BOOTPROTO', 'none'),
+ ('STARTMODE', 'auto'),
])
# If these keys exist, then their values will be used to form
@@ -346,6 +347,7 @@ class Renderer(renderer.Renderer):
iface_cfg.name))
if subnet.get('control') == 'manual':
iface_cfg['ONBOOT'] = False
+ iface_cfg['STARTMODE'] = 'manual'
# set IPv4 and IPv6 static addresses
ipv4_index = -1
--- tests/unittests/test_distros/test_netconfig.py.orig
+++ tests/unittests/test_distros/test_netconfig.py
@@ -468,6 +468,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -476,6 +477,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -499,6 +501,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -507,6 +510,7 @@ class TestNetCfgDistroRedhat(TestNetCfgD
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -559,6 +563,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -567,6 +572,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -587,6 +593,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -595,6 +602,7 @@ class TestNetCfgDistroOpensuse(TestNetCf
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
--- tests/unittests/test_net.py.orig
+++ tests/unittests/test_net.py
@@ -144,6 +144,7 @@ IPADDR=172.19.1.34
NETMASK=255.255.252.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -177,6 +178,7 @@ IPADDR=172.19.1.34
NETMASK=255.255.252.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -246,6 +248,7 @@ NETMASK=255.255.252.0
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -281,6 +284,7 @@ NETMASK=255.255.252.0
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -372,6 +376,7 @@ IPV6_DEFAULTGW=2001:DB8::1
NETMASK=255.255.252.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -409,6 +414,7 @@ IPV6_DEFAULTGW=2001:DB8::1
NETMASK=255.255.252.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()),
@@ -525,6 +531,7 @@ NETWORK_CONFIGS = {
HWADDR=cf:d6:af:48:e8:80
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
'ifcfg-eth99': textwrap.dedent("""\
@@ -541,6 +548,7 @@ NETWORK_CONFIGS = {
METRIC=10000
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
},
@@ -654,6 +662,7 @@ NETWORK_CONFIGS = {
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
MTU=9000
@@ -693,6 +702,7 @@ NETWORK_CONFIGS = {
DEVICE=iface0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -896,6 +906,7 @@ pre-down route del -net 10.0.0.0 netmask
MACADDR=aa:bb:cc:dd:ee:ff
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Bond
USERCTL=no"""),
'ifcfg-bond0.200': textwrap.dedent("""\
@@ -903,6 +914,7 @@ pre-down route del -net 10.0.0.0 netmask
DEVICE=bond0.200
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
PHYSDEV=bond0
TYPE=Ethernet
USERCTL=no
@@ -920,6 +932,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
PRIO=22
STP=no
TYPE=Bridge
@@ -930,6 +943,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=c0:d6:9f:2c:e8:80
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
'ifcfg-eth0.101': textwrap.dedent("""\
@@ -947,6 +961,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
PHYSDEV=eth0
TYPE=Ethernet
USERCTL=no
@@ -958,6 +973,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no"""),
@@ -968,6 +984,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no"""),
@@ -978,6 +995,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=66:bb:9f:2c:e8:80
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
'ifcfg-eth4': textwrap.dedent("""\
@@ -987,6 +1005,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=98:bb:9f:2c:e8:80
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
'ifcfg-eth5': textwrap.dedent("""\
@@ -995,6 +1014,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=98:bb:9f:2c:e8:8a
NM_CONTROLLED=no
ONBOOT=no
+ STARTMODE=manual
TYPE=Ethernet
USERCTL=no""")
},
@@ -1306,6 +1326,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Bond
USERCTL=no
"""),
@@ -1316,6 +1337,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no
@@ -1332,6 +1354,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no
@@ -1358,6 +1381,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Bond
USERCTL=no
"""),
@@ -1368,6 +1392,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no
@@ -1390,6 +1415,7 @@ pre-down route del -net 10.0.0.0 netmask
MASTER=bond0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
SLAVE=yes
TYPE=Ethernet
USERCTL=no
@@ -1428,6 +1454,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=aa:bb:cc:dd:e8:00
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no"""),
'ifcfg-en0.99': textwrap.dedent("""\
@@ -1445,6 +1472,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK1=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
PHYSDEV=en0
TYPE=Ethernet
USERCTL=no
@@ -1486,6 +1514,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
PRIO=22
STP=no
TYPE=Bridge
@@ -1500,6 +1529,7 @@ pre-down route del -net 10.0.0.0 netmask
IPV6INIT=yes
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -1512,6 +1542,7 @@ pre-down route del -net 10.0.0.0 netmask
IPV6INIT=yes
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -1586,6 +1617,7 @@ pre-down route del -net 10.0.0.0 netmask
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=no
+ STARTMODE=manual
TYPE=Ethernet
USERCTL=no
"""),
@@ -1596,6 +1628,7 @@ pre-down route del -net 10.0.0.0 netmask
MTU=1480
NM_CONTROLLED=no
ONBOOT=yes
+ STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""),
@@ -1605,6 +1638,7 @@ pre-down route del -net 10.0.0.0 netmask
HWADDR=52:54:00:12:34:ff
NM_CONTROLLED=no
ONBOOT=no
+ STARTMODE=manual
TYPE=Ethernet
USERCTL=no
"""),
@@ -1971,6 +2005,7 @@ DEVICE=eth1000
HWADDR=07-1C-C6-75-A4-BE
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()
@@ -2092,6 +2127,7 @@ IPADDR=10.0.2.15
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""
@@ -2113,6 +2149,7 @@ BOOTPROTO=dhcp
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""
@@ -2260,6 +2297,7 @@ DEVICE=eth1000
HWADDR=07-1C-C6-75-A4-BE
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
""".lstrip()
@@ -2381,6 +2419,7 @@ IPADDR=10.0.2.15
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""
@@ -2402,6 +2441,7 @@ BOOTPROTO=dhcp
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
+STARTMODE=auto
TYPE=Ethernet
USERCTL=no
"""