diff --git a/backport-add-Requires-cloud-init-hotplugd.socket-in-cloud-init-hotplugd.service-file.patch b/backport-add-Requires-cloud-init-hotplugd.socket-in-cloud-init-hotplugd.service-file.patch deleted file mode 100644 index b5d3bbbc4225e161d0ff0327aa9c86c7d6757af3..0000000000000000000000000000000000000000 --- a/backport-add-Requires-cloud-init-hotplugd.socket-in-cloud-init-hotplugd.service-file.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fca5bb77c251bea6ed7a21e9b9e0b320a01575a9 Mon Sep 17 00:00:00 2001 -From: yangzz-97 <70520104+yangzz-97@users.noreply.github.com> -Date: Fri, 18 Mar 2022 04:12:31 +0800 -Subject: [PATCH] add Requires=cloud-init-hotplugd.socket in - cloud-init-hotplugd.service file (#1335) - -Signed-off-by: yangzz-97 ---- - systemd/cloud-init-hotplugd.service | 1 + - tools/.github-cla-signers | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/systemd/cloud-init-hotplugd.service b/systemd/cloud-init-hotplugd.service -index b64632efe9..10962d549e 100644 ---- a/systemd/cloud-init-hotplugd.service -+++ b/systemd/cloud-init-hotplugd.service -@@ -12,6 +12,7 @@ - [Unit] - Description=cloud-init hotplug hook daemon - After=cloud-init-hotplugd.socket -+Requires=cloud-init-hotplugd.socket - - [Service] - Type=simple -diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers -index e205d6ea32..27352aba73 100644 ---- a/tools/.github-cla-signers -+++ b/tools/.github-cla-signers -@@ -92,4 +92,5 @@ Vultaire - WebSpider - xiachen-rh - xnox -+yangzz-97 - zhuzaifangxuele diff --git a/backport-testing-add-additional-mocks-to-test_net-tests-1356.patch b/backport-testing-add-additional-mocks-to-test_net-tests-1356.patch deleted file mode 100644 index b17be311b68472b438086dc34d5be90820847877..0000000000000000000000000000000000000000 --- a/backport-testing-add-additional-mocks-to-test_net-tests-1356.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d8f39d79fcdb548252823949a4b24f49a00e8c27 Mon Sep 17 00:00:00 2001 -From: yangzz-97 <70520104+yangzz-97@users.noreply.github.com> -Date: Thu, 31 Mar 2022 22:00:33 +0800 -Subject: [PATCH 193/195] testing: add additional mocks to test_net tests - (#1356) - -Tests in tests/unittests/test_net.py::TestGetInterfaces were missing -mocks for bond and failover calls. - -Signed-off-by: yangzz-97 ---- - tests/unittests/test_net.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py -index fa8b99a0..6844c329 100644 ---- a/tests/unittests/test_net.py -+++ b/tests/unittests/test_net.py -@@ -7454,6 +7454,12 @@ class TestGetInterfaces(CiTestCase): - def _se_interface_has_own_mac(self, name): - return name in self.data["own_macs"] - -+ def _se_is_bond(self, name): -+ return name in self.data["bonds"] -+ -+ def _se_is_netfailover(self, name): -+ return False -+ - def _mock_setup(self): - self.data = copy.deepcopy(self._data) - self.data["devices"] = set(list(self.data["macs"].keys())) -@@ -7465,6 +7471,8 @@ class TestGetInterfaces(CiTestCase): - "is_vlan", - "device_driver", - "device_devid", -+ "is_bond", -+ "is_netfailover", - ) - self.mocks = {} - for n in mocks: --- -2.27.0 \ No newline at end of file diff --git a/bugfix-cloud-init-add-openEuler-os.patch b/bugfix-cloud-init-add-openEuler-os.patch index b86d26c9784fd86f679ab7d6e9a7d568b8c122a0..f77e8e03695f2e6eba0660075f24782be9733357 100644 --- a/bugfix-cloud-init-add-openEuler-os.patch +++ b/bugfix-cloud-init-add-openEuler-os.patch @@ -17,16 +17,16 @@ Signed-off-by: chengquan config/cloud.cfg.tmpl | 8 ++++---- systemd/cloud-init-generator.tmpl | 2 +- systemd/cloud-init.service.tmpl | 2 +- + tests/unittests/test_cli.py | 2 +- tools/render-cloudcfg | 2 +- - tests/unittests/test_cli.py | 2 +- 12 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 cloudinit/distros/openeuler.py diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py -index 25bba76..8f576f3 100644 +index 3bc1d30..6b0f302 100644 --- a/cloudinit/config/cc_ntp.py +++ b/cloudinit/config/cc_ntp.py -@@ -33,7 +33,7 @@ distros = [ +@@ -29,7 +29,7 @@ distros = [ "eurolinux", "fedora", "miraclelinux", @@ -36,49 +36,49 @@ index 25bba76..8f576f3 100644 "photon", "rhel", diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py -index b2970d5..d24cd3a 100644 +index bbf6807..845e793 100644 --- a/cloudinit/config/cc_resolv_conf.py +++ b/cloudinit/config/cc_resolv_conf.py -@@ -54,7 +54,7 @@ LOG = logging.getLogger(__name__) - - frequency = PER_INSTANCE - --distros = ["alpine", "fedora", "opensuse", "photon", "rhel", "sles"] -+distros = ["alpine", "fedora", "opensuse", "photon", "rhel", "sles", 'openeuler'] - - RESOLVE_CONFIG_TEMPLATE_MAP = { - "/etc/resolv.conf": "resolv.conf", +@@ -52,7 +52,7 @@ meta: MetaSchema = { + "name": "Resolv Conf", + "title": "Configure resolv.conf", + "description": MODULE_DESCRIPTION, +- "distros": ["alpine", "fedora", "opensuse", "photon", "rhel", "sles"], ++ "distros": ["alpine", "fedora", "opensuse", "photon", "rhel", "sles", "openeuler"], + "frequency": PER_INSTANCE, + "examples": [ + dedent( diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py -index b81a7a9..74392ca 100644 +index b742cb9..4d8244f 100644 --- a/cloudinit/config/cc_rh_subscription.py +++ b/cloudinit/config/cc_rh_subscription.py -@@ -43,7 +43,7 @@ from cloudinit import subp, util - - LOG = logging.getLogger(__name__) - --distros = ["fedora", "rhel"] -+distros = ["fedora", "rhel", "openeuler"] - - - def handle(name, cfg, _cloud, log, _args): +@@ -30,7 +30,7 @@ meta: MetaSchema = { + "name": "Red Hat Subscription", + "title": "Register Red Hat Enterprise Linux based system", + "description": MODULE_DESCRIPTION, +- "distros": ["fedora", "rhel"], ++ "distros": ["fedora", "rhel", "openeuler"], + "frequency": PER_INSTANCE, + "examples": [ + dedent( diff --git a/cloudinit/config/cc_spacewalk.py b/cloudinit/config/cc_spacewalk.py -index 3fa6c38..4374599 100644 +index 6820a81..d97da92 100644 --- a/cloudinit/config/cc_spacewalk.py +++ b/cloudinit/config/cc_spacewalk.py -@@ -29,7 +29,7 @@ For more information about spacewalk see: https://fedorahosted.org/spacewalk/ - - from cloudinit import subp - --distros = ["redhat", "fedora"] -+distros = ["redhat", "fedora", "openeuler"] - required_packages = ["rhn-setup"] - def_ca_cert_path = "/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT" - +@@ -22,7 +22,7 @@ meta: MetaSchema = { + "name": "Spacewalk", + "title": "Install and configure spacewalk", + "description": MODULE_DESCRIPTION, +- "distros": ["rhel", "fedora"], ++ "distros": ["rhel", "fedora", "openeuler"], + "frequency": PER_INSTANCE, + "examples": [ + dedent( diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py -index 7a23268..971e97c 100644 +index f735719..cc787a3 100644 --- a/cloudinit/config/cc_yum_add_repo.py +++ b/cloudinit/config/cc_yum_add_repo.py -@@ -43,7 +43,7 @@ distros = [ +@@ -28,7 +28,7 @@ distros = [ "cloudlinux", "eurolinux", "fedora", @@ -88,7 +88,7 @@ index 7a23268..971e97c 100644 "rhel", "rocky", diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py -index 76acd6a..b75bb9c 100755 +index b034e2c..be063c2 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -46,7 +46,7 @@ OSFAMILIES = { @@ -119,28 +119,28 @@ index 0000000..7505ca4 + +# vi: ts=4 expandtab diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl -index fb4b456..6702801 100644 +index 6951a0e..8740752 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl @@ -33,7 +33,7 @@ disable_root: true {% endif %} - + {% if variant in ["almalinux", "alpine", "amazon", "centos", "cloudlinux", "eurolinux", - "fedora", "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %} + "fedora", "miraclelinux", "openeuler", "rhel", "rocky", "virtuozzo"] %} - mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] - {% if variant == "amazon" %} - resize_rootfs: noblock -@@ -111,7 +111,7 @@ cloud_config_modules: - - locale + {% if variant == "rhel" %} + mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service,_netdev', '0', '2'] + {% else %} +@@ -125,7 +125,7 @@ cloud_config_modules: + {% if variant in ["rhel"] %} + - rh_subscription {% endif %} - - set-passwords -{% if variant in ["rhel", "fedora", "photon"] %} +{% if variant in ["rhel", "fedora", "photon", "openeuler"] %} {% if variant not in ["photon"] %} - spacewalk {% endif %} -@@ -177,7 +177,7 @@ cloud_final_modules: +@@ -191,7 +191,7 @@ cloud_final_modules: system_info: # This will affect which distro class gets used {% if variant in ["almalinux", "alpine", "amazon", "arch", "centos", "cloudlinux", "debian", @@ -149,7 +149,7 @@ index fb4b456..6702801 100644 "photon", "rhel", "rocky", "suse", "ubuntu", "virtuozzo"] %} distro: {{ variant }} {% elif variant in ["dragonfly"] %} -@@ -232,7 +232,7 @@ system_info: +@@ -245,7 +245,7 @@ system_info: security: http://ports.ubuntu.com/ubuntu-ports ssh_svcname: ssh {% elif variant in ["almalinux", "alpine", "amazon", "arch", "centos", "cloudlinux", "eurolinux", @@ -158,8 +158,21 @@ index fb4b456..6702801 100644 # Default user name + that default users groups (if added/used) default_user: {% if variant == "amazon" %} +diff --git a/systemd/cloud-init-generator.tmpl b/systemd/cloud-init-generator.tmpl +index 6689309..12aa52f 100644 +--- a/systemd/cloud-init-generator.tmpl ++++ b/systemd/cloud-init-generator.tmpl +@@ -21,7 +21,7 @@ CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target" + CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" + {% endif %} + {% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora", +- "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %} ++ "miraclelinux", "openeuler", "rhel", "rocky", "virtuozzo"] %} + dsidentify="/usr/libexec/cloud-init/ds-identify" + {% else %} + dsidentify="/usr/lib/cloud-init/ds-identify" diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl -index e71e567..ce4f183 100644 +index c170aef..0ec2636 100644 --- a/systemd/cloud-init.service.tmpl +++ b/systemd/cloud-init.service.tmpl @@ -13,7 +13,7 @@ After=systemd-networkd-wait-online.service @@ -171,8 +184,21 @@ index e71e567..ce4f183 100644 After=network.service After=NetworkManager.service {% endif %} +diff --git a/tests/unittests/test_cli.py b/tests/unittests/test_cli.py +index 7846d0d..0c525dd 100644 +--- a/tests/unittests/test_cli.py ++++ b/tests/unittests/test_cli.py +@@ -260,7 +260,7 @@ class TestCLI(test_helpers.FilesystemMockingTestCase): + "**Supported distros:** all", + "**Supported distros:** almalinux, alpine, centos, " + "cloudlinux, debian, eurolinux, fedora, miraclelinux, " +- "openEuler, opensuse, photon, rhel, rocky, sles, ubuntu, " ++ "openeuler, opensuse, photon, rhel, rocky, sles, ubuntu, " + "virtuozzo", + "**Config schema**:\n **resize_rootfs:** " + "(``true``/``false``/``noblock``)", diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg -index 176df36..6e79e95 100755 +index afe999e..cc9f054 100755 --- a/tools/render-cloudcfg +++ b/tools/render-cloudcfg @@ -24,7 +24,7 @@ def main(): @@ -184,33 +210,6 @@ index 176df36..6e79e95 100755 "photon", "rhel", "suse", - -diff --git a/tests/unittests/test_cli.py b/tests/unittests/test_cli.py -index bed73a9..01945cc 100644 ---- a/tests/unittests/test_cli.py -+++ b/tests/unittests/test_cli.py -@@ -257,7 +257,7 @@ class TestCLI(test_helpers.FilesystemMockingTestCase): - "**Supported distros:** all", - "**Supported distros:** almalinux, alpine, centos, " - "cloudlinux, debian, eurolinux, fedora, miraclelinux, " -- "openEuler, opensuse, photon, rhel, rocky, sles, ubuntu, " -+ "openeuler, opensuse, photon, rhel, rocky, sles, ubuntu, " - "virtuozzo", - "**Config schema**:\n **resize_rootfs:** " - "(true/false/noblock)", -diff --git a/systemd/cloud-init-generator.tmpl b/systemd/cloud-init-generator.tmpl -index 74d4742..a7cf381 100644 ---- a/systemd/cloud-init-generator.tmpl -+++ b/systemd/cloud-init-generator.tmpl -@@ -84,7 +84,7 @@ default() { - check_for_datasource() { - local ds_rc="" - {% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora", -- "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %} -+ "miraclelinux", "openeuler", "rhel", "rocky", "virtuozzo"] %} - local dsidentify="/usr/libexec/cloud-init/ds-identify" - {% else %} - local dsidentify="/usr/lib/cloud-init/ds-identify" -- -1.8.3.1 +2.27.0 diff --git a/cloud-init-20.4-nm-controlled.patch b/cloud-init-20.4-nm-controlled.patch deleted file mode 100644 index c42ffc0d907ec1ee2d1855de7fc20c5a7d26061c..0000000000000000000000000000000000000000 --- a/cloud-init-20.4-nm-controlled.patch +++ /dev/null @@ -1,500 +0,0 @@ -From 8256852de570a0c6b237c75abd134ddbafee5c1f Mon Sep 17 00:00:00 2001 -From: Eduardo Otubo -Date: Thu, 3 Dec 2020 12:31:50 +0100 -Subject: [PATCH] Do not write NM_CONTROLLED=no in generated interface config - files - -Conflicts 20.3: - - Not appplying patch on cloudinit/net/sysconfig.py since it now has a -mechanism to identify if cloud-init is running on RHEL, having the -correct settings for NM_CONTROLLED. - -X-downstream-only: true -Signed-off-by: Eduardo Otubo -Signed-off-by: Ryan McCabe ---- - cloudinit/net/sysconfig.py | 2 +- - .../unittests/test_distros/test_netconfig.py | 8 --- - tests/unittests/test_net.py | 49 ------------------- - 3 files changed, 1 insertion(+), 58 deletions(-) - -diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py -index ef4543b..13c6ad7 100644 ---- a/cloudinit/net/sysconfig.py -+++ b/cloudinit/net/sysconfig.py -@@ -290,7 +290,7 @@ class Renderer(renderer.Renderer): - # details about this) - - iface_defaults = { -- 'rhel': {'ONBOOT': True, 'USERCTL': False, 'NM_CONTROLLED': False, -+ 'rhel': {'ONBOOT': True, 'USERCTL': False, - 'BOOTPROTO': 'none'}, - 'suse': {'BOOTPROTO': 'static', 'STARTMODE': 'auto'}, - } -diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py -index d09e46a..3f01c99 100644 ---- a/tests/unittests/test_distros/test_netconfig.py -+++ b/tests/unittests/test_distros/test_netconfig.py -@@ -503,7 +503,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - GATEWAY=192.168.1.254 - IPADDR=192.168.1.5 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -511,7 +510,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - self.ifcfg_path('eth1'): dedent("""\ - BOOTPROTO=dhcp - DEVICE=eth1 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -536,7 +534,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - IPV6_AUTOCONF=no - IPV6_DEFAULTGW=2607:f0d0:1002:0011::1 - IPV6_FORCE_ACCEPT_RA=no -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -544,7 +541,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - self.ifcfg_path('eth1'): dedent("""\ - BOOTPROTO=dhcp - DEVICE=eth1 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -578,7 +574,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - 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 -@@ -588,7 +583,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - DEVICE=infra0 - IPADDR=10.0.1.2 - NETMASK=255.255.0.0 -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=eth0 - USERCTL=no -@@ -617,7 +611,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - DEVICE=eth0 - IPADDR=192.10.1.2 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -627,7 +620,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase): - DEVICE=eth0.1001 - IPADDR=10.0.1.2 - NETMASK=255.255.0.0 -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=eth0 - USERCTL=no -diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py -index 094450b..6294f4b 100644 ---- a/tests/unittests/test_net.py -+++ b/tests/unittests/test_net.py -@@ -535,7 +535,6 @@ GATEWAY=172.19.3.254 - HWADDR=fa:16:3e:ed:9a:59 - IPADDR=172.19.1.34 - NETMASK=255.255.252.0 --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -633,7 +632,6 @@ IPADDR=172.19.1.34 - IPADDR1=10.0.0.10 - NETMASK=255.255.252.0 - NETMASK1=255.255.255.0 --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -756,7 +754,6 @@ IPV6_AUTOCONF=no - IPV6_DEFAULTGW=2001:DB8::1 - IPV6_FORCE_ACCEPT_RA=no - NETMASK=255.255.252.0 --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -910,7 +907,6 @@ NETWORK_CONFIGS = { - BOOTPROTO=none - DEVICE=eth1 - HWADDR=cf:d6:af:48:e8:80 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -927,7 +923,6 @@ NETWORK_CONFIGS = { - IPADDR=192.168.21.3 - NETMASK=255.255.255.0 - METRIC=10000 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -1075,7 +1070,6 @@ NETWORK_CONFIGS = { - IPV6_AUTOCONF=no - IPV6_FORCE_ACCEPT_RA=no - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1144,7 +1138,6 @@ NETWORK_CONFIGS = { - DHCPV6C=yes - IPV6INIT=yes - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1199,7 +1192,6 @@ NETWORK_CONFIGS = { - IPV6INIT=yes - IPV6_FORCE_ACCEPT_RA=yes - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1261,7 +1253,6 @@ NETWORK_CONFIGS = { - IPV6INIT=yes - IPV6_FORCE_ACCEPT_RA=no - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1313,7 +1304,6 @@ NETWORK_CONFIGS = { - IPV6_AUTOCONF=yes - IPV6INIT=yes - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1340,7 +1330,6 @@ NETWORK_CONFIGS = { - IPV6_AUTOCONF=no - IPV6_FORCE_ACCEPT_RA=no - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1387,7 +1376,6 @@ NETWORK_CONFIGS = { - IPV6_AUTOCONF=yes - IPV6INIT=yes - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1435,7 +1423,6 @@ NETWORK_CONFIGS = { - IPV6_AUTOCONF=no - IPV6_FORCE_ACCEPT_RA=yes - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1468,7 +1455,6 @@ NETWORK_CONFIGS = { - 'ifcfg-iface0': textwrap.dedent("""\ - BOOTPROTO=dhcp - DEVICE=iface0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1511,7 +1497,6 @@ NETWORK_CONFIGS = { - BOOTPROTO=dhcp - DEVICE=iface0 - ETHTOOL_OPTS="wol g" -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -1800,7 +1785,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - DHCPV6C=yes - IPV6INIT=yes - MACADDR=aa:bb:cc:dd:ee:ff -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Bond - USERCTL=no"""), -@@ -1808,7 +1792,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - BOOTPROTO=dhcp - DEVICE=bond0.200 - DHCLIENT_SET_DEFAULT_ROUTE=no -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=bond0 - USERCTL=no -@@ -1826,7 +1809,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - IPV6_DEFAULTGW=2001:4800:78ff:1b::1 - MACADDR=bb:bb:bb:bb:bb:aa - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - PRIO=22 - STP=no -@@ -1836,7 +1818,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - BOOTPROTO=none - DEVICE=eth0 - HWADDR=c0:d6:9f:2c:e8:80 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -1853,7 +1834,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - MTU=1500 - NETMASK=255.255.255.0 - NETMASK1=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=eth0 - USERCTL=no -@@ -1863,7 +1843,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - DEVICE=eth1 - HWADDR=aa:d6:9f:2c:e8:80 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Ethernet -@@ -1873,7 +1852,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - DEVICE=eth2 - HWADDR=c0:bb:9f:2c:e8:80 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Ethernet -@@ -1883,7 +1861,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - BRIDGE=br0 - DEVICE=eth3 - HWADDR=66:bb:9f:2c:e8:80 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -1892,7 +1869,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - BRIDGE=br0 - DEVICE=eth4 - HWADDR=98:bb:9f:2c:e8:80 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -1901,7 +1877,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - DEVICE=eth5 - DHCLIENT_SET_DEFAULT_ROUTE=no - HWADDR=98:bb:9f:2c:e8:8a -- NM_CONTROLLED=no - ONBOOT=no - TYPE=Ethernet - USERCTL=no"""), -@@ -1912,7 +1887,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true - IPADDR=192.168.200.7 - MTU=9000 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=InfiniBand - USERCTL=no"""), -@@ -2357,7 +2331,6 @@ iface bond0 inet6 static - MTU=9000 - NETMASK=255.255.255.0 - NETMASK1=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Bond - USERCTL=no -@@ -2367,7 +2340,6 @@ iface bond0 inet6 static - DEVICE=bond0s0 - HWADDR=aa:bb:cc:dd:e8:00 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Ethernet -@@ -2389,7 +2361,6 @@ iface bond0 inet6 static - DEVICE=bond0s1 - HWADDR=aa:bb:cc:dd:e8:01 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Ethernet -@@ -2446,7 +2417,6 @@ iface bond0 inet6 static - BOOTPROTO=none - DEVICE=en0 - HWADDR=aa:bb:cc:dd:e8:00 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no"""), -@@ -2465,7 +2435,6 @@ iface bond0 inet6 static - MTU=2222 - NETMASK=255.255.255.0 - NETMASK1=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=en0 - USERCTL=no -@@ -2530,7 +2499,6 @@ iface bond0 inet6 static - DEVICE=br0 - IPADDR=192.168.2.2 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - PRIO=22 - STP=no -@@ -2546,7 +2514,6 @@ iface bond0 inet6 static - IPV6INIT=yes - IPV6_AUTOCONF=no - IPV6_FORCE_ACCEPT_RA=no -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -2560,7 +2527,6 @@ iface bond0 inet6 static - IPV6INIT=yes - IPV6_AUTOCONF=no - IPV6_FORCE_ACCEPT_RA=no -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -2654,7 +2620,6 @@ iface bond0 inet6 static - HWADDR=52:54:00:12:34:00 - IPADDR=192.168.1.2 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=no - TYPE=Ethernet - USERCTL=no -@@ -2664,7 +2629,6 @@ iface bond0 inet6 static - DEVICE=eth1 - HWADDR=52:54:00:12:34:aa - MTU=1480 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -2673,7 +2637,6 @@ iface bond0 inet6 static - BOOTPROTO=none - DEVICE=eth2 - HWADDR=52:54:00:12:34:ff -- NM_CONTROLLED=no - ONBOOT=no - TYPE=Ethernet - USERCTL=no -@@ -3094,7 +3057,6 @@ class TestRhelSysConfigRendering(CiTestCase): - BOOTPROTO=dhcp - DEVICE=eth1000 - HWADDR=07-1c-c6-75-a4-be --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -3215,7 +3177,6 @@ GATEWAY=10.0.2.2 - HWADDR=52:54:00:12:34:00 - IPADDR=10.0.2.15 - NETMASK=255.255.255.0 --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -3246,7 +3207,6 @@ 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 -@@ -3260,7 +3220,6 @@ 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 -@@ -3285,7 +3244,6 @@ USERCTL=no - # - BOOTPROTO=dhcp - DEVICE=eth0 --NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -3560,7 +3518,6 @@ USERCTL=no - IPV6_FORCE_ACCEPT_RA=no - IPV6_DEFAULTGW=2001:db8::1 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -3585,7 +3542,6 @@ USERCTL=no - 'ifcfg-eno1': textwrap.dedent("""\ - BOOTPROTO=none - DEVICE=eno1 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no -@@ -3596,7 +3552,6 @@ USERCTL=no - IPADDR=192.6.1.9 - MTU=1495 - NETMASK=255.255.255.0 -- NM_CONTROLLED=no - ONBOOT=yes - PHYSDEV=eno1 - USERCTL=no -@@ -3626,7 +3581,6 @@ USERCTL=no - IPADDR=10.101.8.65 - MTU=1334 - NETMASK=255.255.255.192 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Bond - USERCTL=no -@@ -3636,7 +3590,6 @@ USERCTL=no - BOOTPROTO=none - DEVICE=enp0s0 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Bond -@@ -3647,7 +3600,6 @@ USERCTL=no - BOOTPROTO=none - DEVICE=enp0s1 - MASTER=bond0 -- NM_CONTROLLED=no - ONBOOT=yes - SLAVE=yes - TYPE=Bond -@@ -3671,7 +3623,6 @@ USERCTL=no - DEVICE=eno1 - HWADDR=07-1c-c6-75-a4-be - METRIC=100 -- NM_CONTROLLED=no - ONBOOT=yes - TYPE=Ethernet - USERCTL=no --- -1.8.3.1 - diff --git a/cloud-init-20.4-no-override-default-network.patch b/cloud-init-20.4-no-override-default-network.patch deleted file mode 100644 index 6e1ac7afd0b411afd352c1b1bcd10f814aafa6b8..0000000000000000000000000000000000000000 --- a/cloud-init-20.4-no-override-default-network.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 5514d5922cbc92278868bfea587c4207619d81fc Mon Sep 17 00:00:00 2001 -From: Eduardo Otubo -Date: Thu, 3 Dec 2020 12:34:01 +0100 -Subject: [PATCH 3/3] Don't override default network configuration - -Signed-off-by: Eduardo Otubo ---- - cloudinit/net/sysconfig.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py -index 9c822c3e..a240f65e 100644 ---- a/cloudinit/net/sysconfig.py -+++ b/cloudinit/net/sysconfig.py -@@ -918,7 +918,17 @@ class Renderer(renderer.Renderer): - # Distros configuring /etc/sysconfig/network as a file e.g. Centos - if sysconfig_path.endswith('network'): - util.ensure_dir(os.path.dirname(sysconfig_path)) -- netcfg = [_make_header(), 'NETWORKING=yes'] -+ # Make sure that existing lines, other than overriding ones, remain -+ netcfg = [] -+ for line in util.load_file(sysconfig_path, quiet=True).split('\n'): -+ if 'cloud-init' in line: -+ break -+ if not line.startswith(('NETWORKING=', -+ 'IPV6_AUTOCONF=', -+ 'NETWORKING_IPV6=')): -+ netcfg.append(line) -+ # Now generate the cloud-init portion of sysconfig/network -+ netcfg.extend([_make_header(), 'NETWORKING=yes']) - if network_state.use_ipv6: - netcfg.append('NETWORKING_IPV6=yes') - netcfg.append('IPV6_AUTOCONF=no') --- -2.27.0 - diff --git a/cloud-init-22.1.tar.gz b/cloud-init-22.1.tar.gz deleted file mode 100644 index a49e0b2af13ba2cd96d43267042102cc6787d331..0000000000000000000000000000000000000000 Binary files a/cloud-init-22.1.tar.gz and /dev/null differ diff --git a/cloud-init-22.2.tar.gz b/cloud-init-22.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a512e142e02da95148cd04ca60bde488092e431 Binary files /dev/null and b/cloud-init-22.2.tar.gz differ diff --git a/cloud-init.spec b/cloud-init.spec index 8327626e17cbd0f9f6e754aa907afb4eb652b607..16e45b06615954d9016c2b70d56a6680bea4a44e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,5 +1,5 @@ Name: cloud-init -Version: 22.1 +Version: 22.2 Release: 1 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 @@ -12,10 +12,7 @@ Patch0: cloud-init-22.1-no-override-default-network.patch Patch1: bugfix-cloud-init-add-openEuler-os.patch Patch2: bugfix-sort-requirements.patch Patch3: add-variable-to-forbid-tmp-dir.patch -Patch4: backport-add-Requires-cloud-init-hotplugd.socket-in-cloud-init-hotplugd.service-file.patch -Patch5: backport-testing-add-additional-mocks-to-test_net-tests-1356.patch - -Patch9000: Fix-the-error-level-logs-displayed-for-the-cloud-init-local-service.patch +Patch4: Fix-the-error-level-logs-displayed-for-the-cloud-init-local-service.patch BuildRequires: pkgconfig(systemd) python3-devel python3-setuptools systemd BuildRequires: iproute python3-configobj python3-httpretty >= 0.8.14-2 @@ -23,6 +20,7 @@ BuildRequires: python3-jinja2 python3-jsonpatch python3-jsonschema BuildRequires: python3-mock python3-oauthlib python3-prettytable BuildRequires: python3-pyserial python3-PyYAML python3-requests python3-six BuildRequires: python3-unittest2 dnf %{_vendor}-release python3-pytest passwd python3-netifaces +BuildRequires: python3-pytest-mock Requires: e2fsprogs iproute python3-libselinux net-tools python3-policycoreutils Requires: procps python3-configobj python3-jinja2 python3-jsonpatch xfsprogs @@ -60,6 +58,10 @@ install -D -m 0644 tools/21-cloudinit.conf %{buildroot}/%{_sysconfdir}/rsyslog.d rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_handler/test_handler_ntp.py rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_datasource/test_opennebula.py +# nothing provides python3-responses +rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/test_url_helper.py +rm -f $RPM_BUILD_DIR/%{name}-%{version}/tests/unittests/sources/test_ec2.py + python3 -m pytest tests/unittests/ %pre @@ -125,6 +127,9 @@ fi %exclude /usr/share/doc/* %changelog +* Wed Aug 3 2022 panxiaohe - 22.2-1 +- update to 22.2 + * Sat Apr 2 2022 yangzhuangzhuang - 22.1-1 - Type:update - ID:NA