Skip to content

Commit

Permalink
fix(rhel)!: Fix network boot order in upstream cloud-init
Browse files Browse the repository at this point in the history
BREAKING_CHANGE: Use NetworkManager renderer by default for RHEL family
Fixes GH-3781
  • Loading branch information
holmanb authored Mar 26, 2024
2 parents 180a623 + 9a7674a commit d53623e
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 68 deletions.
1 change: 0 additions & 1 deletion cloudinit/net/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ class Renderer(renderer.Renderer):
"rhel": {
"ONBOOT": True,
"USERCTL": False,
"NM_CONTROLLED": False,
"BOOTPROTO": "none",
},
"suse": {"BOOTPROTO": "static", "STARTMODE": "auto"},
Expand Down
2 changes: 1 addition & 1 deletion config/cloud.cfg.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ system_info:
activators: ['netplan', 'eni', 'network-manager', 'networkd']
{% elif is_rhel %}
network:
renderers: ['sysconfig', 'eni', 'netplan', 'network-manager', 'networkd']
renderers: ['eni', 'netplan', 'network-manager', 'sysconfig', 'networkd']
{% endif %}
{% if variant == "photon" %}
# If set to true, cloud-init will not use fallback network config.
Expand Down
2 changes: 0 additions & 2 deletions doc/rtd/reference/network-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,13 @@ Example output:
BOOTPROTO=static
DEVICE=eth7
IPADDR=192.168.1.5/255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
# Created by cloud-init automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth9
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/cmd/devel/test_net_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
#
BOOTPROTO=dhcp
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand Down
8 changes: 0 additions & 8 deletions tests/unittests/distros/test_netconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,6 @@ def test_apply_network_config_rh(self):
GATEWAY=192.168.1.254
IPADDR=192.168.1.5
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand All @@ -733,7 +732,6 @@ def test_apply_network_config_rh(self):
"""\
BOOTPROTO=dhcp
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand Down Expand Up @@ -764,7 +762,6 @@ def test_apply_network_config_ipv6_rh(self):
IPV6_AUTOCONF=no
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
IPV6_FORCE_ACCEPT_RA=no
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand All @@ -774,7 +771,6 @@ def test_apply_network_config_ipv6_rh(self):
"""\
BOOTPROTO=dhcp
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand Down Expand Up @@ -821,7 +817,6 @@ def test_vlan_render_unsupported(self):
HWADDR=00:16:3e:60:7c:df
IPADDR=192.10.1.2
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand All @@ -833,7 +828,6 @@ def test_vlan_render_unsupported(self):
DEVICE=infra0
IPADDR=10.0.1.2
NETMASK=255.255.0.0
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=eth0
USERCTL=no
Expand Down Expand Up @@ -869,7 +863,6 @@ def test_vlan_render(self):
DEVICE=eth0
IPADDR=192.10.1.2
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expand All @@ -881,7 +874,6 @@ def test_vlan_render(self):
DEVICE=eth0.1001
IPADDR=10.0.1.2
NETMASK=255.255.0.0
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=eth0
USERCTL=no
Expand Down
Loading

0 comments on commit d53623e

Please sign in to comment.