From 904e611fc228001adc0febb0218eebbca6a56dd7 Mon Sep 17 00:00:00 2001 From: RH Virt Maint Bot <8309305-rh-virt-maint-bot@users.noreply.gitlab.com> Date: Mon, 19 Jun 2023 08:58:52 +0000 Subject: [PATCH] * Mon Jun 19 2023 Miroslav Rezanina - 23.1.1-7 - 0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch - 0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch [bz#2209349] - Resolves: bz#2209349 --- ...lt-renderer-as-sysconfig-for-c9s-RHE.patch | 25 +++++++++++++ ...erer-as-sysconfig-for-centos-rhel-41.patch | 35 +++++++++++++++++++ cloud-init.spec | 31 ++++++++++++++-- 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch create mode 100644 0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch diff --git a/0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch b/0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch new file mode 100644 index 0000000..b4c93c1 --- /dev/null +++ b/0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch @@ -0,0 +1,25 @@ +From 86dd9b0e215a40e60a6c48401a9c04215e10cdea Mon Sep 17 00:00:00 2001 +From: Ani Sinha +Date: Thu, 8 Jun 2023 10:19:49 +0530 +Subject: [PATCH] Revert "Set default renderer as sysconfig for c9s/RHEL 9" + +This reverts commit 5394e28e896e9d18db6d359190bfb58dcbdb2646. + +Revert this downstream-only patch and replace it with the upstream patch. +--- + config/cloud.cfg.tmpl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl +index 22c6654c..7238c102 100644 +--- a/config/cloud.cfg.tmpl ++++ b/config/cloud.cfg.tmpl +@@ -383,7 +383,7 @@ system_info: + renderers: ['freebsd'] + {% elif variant in ["fedora"] or is_rhel %} + network: +- renderers: ['sysconfig', 'eni', 'netplan', 'network-manager', 'networkd'] ++ renderers: ['netplan', 'network-manager', 'networkd', 'sysconfig', 'eni'] + {% elif variant == "openmandriva" %} + network: + renderers: ['network-manager', 'networkd'] diff --git a/0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch b/0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch new file mode 100644 index 0000000..46f0f79 --- /dev/null +++ b/0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch @@ -0,0 +1,35 @@ +From fd4f6d94e09ed97a4dd6aba3284d9156c16c483b Mon Sep 17 00:00:00 2001 +From: Ani Sinha +Date: Thu, 8 Jun 2023 03:29:13 +0530 +Subject: [PATCH] Set default renderer as sysconfig for centos/rhel (#4165) + +Currently, network manager is disabled on c9s and therefore sysconfig is used as the primary renderer for network configuration. We do not want to change this for c9s even when network-manager renderer is re-enabled as it would mean a big behaviour change for cloud-init in the centos 9 stream. + +This change bumps up the priority for sysconfig renderer so that it is used as the primary renderer on c9s and other downstream distributions derived from it. In the next major centos stream release, we may use network manager as the default renderer and make changes accordingly. + +RHBZ: 2209349 + +Signed-off-by: Ani Sinha +(cherry picked from commit a1f375095bd0ac8628c4fdc79538dc177bb9ff99) +--- + config/cloud.cfg.tmpl | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl +index 7238c102..020340f9 100644 +--- a/config/cloud.cfg.tmpl ++++ b/config/cloud.cfg.tmpl +@@ -381,9 +381,12 @@ system_info: + {% elif variant in ["dragonfly"] %} + network: + renderers: ['freebsd'] +-{% elif variant in ["fedora"] or is_rhel %} ++{% elif variant in ["fedora"] %} + network: + renderers: ['netplan', 'network-manager', 'networkd', 'sysconfig', 'eni'] ++{% elif is_rhel %} ++ network: ++ renderers: ['sysconfig', 'eni', 'netplan', 'network-manager', 'networkd' ] + {% elif variant == "openmandriva" %} + network: + renderers: ['network-manager', 'networkd'] diff --git a/cloud-init.spec b/cloud-init.spec index 25b5f86..02f75ba 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 23.1.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Cloud instance init scripts License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -27,6 +27,8 @@ Patch16: 0016-network_manager-add-a-method-for-ipv6-static-IP-conf.patch Patch17: 0017-net-sysconfig-enable-sysconfig-renderer-if-network-m.patch Patch18: 0018-network-manager-Set-higher-autoconnect-priority-for-.patch Patch19: 0019-Set-default-renderer-as-sysconfig-for-c9s-RHEL-9.patch +Patch20: 0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch +Patch21: 0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch BuildArch: noarch @@ -146,7 +148,27 @@ if [ $1 -eq 1 ] ; then /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || : /bin/systemctl enable cloud-init.target >/dev/null 2>&1 || : elif [ $1 -eq 2 ]; then - # Upgrade. If the upgrade is from a version older than 0.7.9-8, + # Upgrade + # RHBZ 2210012 - check for null ssh_genkeytypes value in cloud.cfg that + # breaks ssh connectivity after upgrade to a newer version of cloud-init. + if [ -f %{_sysconfdir}/cloud/cloud.cfg.rpmnew ] && grep -q '^\s*ssh_genkeytypes:\s*~\s*$' %{_sysconfdir}/cloud/cloud.cfg ; then + echo "***********************************************" + echo "*** WARNING!!!! ***" + echo "" + echo "ssh_genkeytypes set to null in /etc/cloud/cloud.cfg!" + echo "SSH access might be broken after reboot. Please check the following KCS" + echo "for more detailed information:" + echo "" + echo "https://access.redhat.com/solutions/6988034" + echo "" + echo "Please reconcile the differences between /etc/cloud/cloud.cfg and " + echo "/etc/cloud/cloud.cfg.rpmnew and update ssh_genkeytypes configuration in " + echo "/etc/cloud/cloud.cfg to a list of keytype values, something like:" + echo "ssh_genkeytypes: ['rsa', 'ecdsa', 'ed25519']" + echo "" + echo "************************************************" + fi + # If the upgrade is from a version older than 0.7.9-8, # there will be stale systemd config /bin/systemctl is-enabled cloud-config.service >/dev/null 2>&1 && /bin/systemctl reenable cloud-config.service >/dev/null 2>&1 || : @@ -216,6 +238,11 @@ fi %config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf %changelog +* Mon Jun 19 2023 Miroslav Rezanina - 23.1.1-7 +- 0020-Revert-Set-default-renderer-as-sysconfig-for-c9s-RHE.patch +- 0021-Set-default-renderer-as-sysconfig-for-centos-rhel-41.patch [bz#2209349] +- Resolves: bz#2209349 + * Tue Jun 06 2023 Camilla Conte - 23.1.1-6 - 0011-Revert-Manual-revert-Use-Network-Manager-and-Netplan.patch - 0012-Revert-Revert-Add-native-NetworkManager-support-1224.patch