From a5a74b402fb367488b84be4dab93796452b7bd7d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 26 2018 15:01:01 +0000 Subject: import cloud-init-0.7.9-24.el7_5.1 --- diff --git a/SOURCES/ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch b/SOURCES/ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch new file mode 100644 index 0000000..20a99d9 --- /dev/null +++ b/SOURCES/ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch @@ -0,0 +1,56 @@ +From b1961175270372dd2a3c2801b0c231af3574a857 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Tue, 17 Apr 2018 13:07:54 +0200 +Subject: [PATCH 2/3] DataSourceAzure.py: use hostnamectl to set hostname + +RH-Author: Vitaly Kuznetsov +Message-id: <20180417130754.12918-3-vkuznets@redhat.com> +Patchwork-id: 79659 +O-Subject: [RHEL7.6/7.5.z cloud-init PATCH 2/2] DataSourceAzure.py: use hostnamectl to set hostname +Bugzilla: 1568717 +RH-Acked-by: Eduardo Otubo +RH-Acked-by: Mohammed Gamal +RH-Acked-by: Cathy Avery + +The right way to set hostname in RHEL7 is: + + $ hostnamectl set-hostname HOSTNAME + +DataSourceAzure, however, uses: + $ hostname HOSTSNAME + +instead and this causes problems. We can't simply change +'BUILTIN_DS_CONFIG' in DataSourceAzure.py as 'hostname' is being used +for both getting and setting the hostname. + +Long term, this should be fixed in a different way. Cloud-init +has distro-specific hostname setting/getting (see +cloudinit/distros/rhel.py) and DataSourceAzure.py needs to be switched +to use these. + +Resolves: rhbz#1434109 + +X-downstream-only: yes + +Signed-off-by: Vitaly Kuznetsov +Signed-off-by: Miroslav Rezanina +--- + cloudinit/sources/DataSourceAzure.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py +index 48a3e1d..6ce700f 100644 +--- a/cloudinit/sources/DataSourceAzure.py ++++ b/cloudinit/sources/DataSourceAzure.py +@@ -71,7 +71,7 @@ def get_hostname(hostname_command='hostname'): + + + def set_hostname(hostname, hostname_command='hostname'): +- util.subp([hostname_command, hostname]) ++ util.subp(['hostnamectl', 'set-hostname', str(hostname)]) + + + @contextlib.contextmanager +-- +1.8.3.1 + diff --git a/SOURCES/ci-Revert-azure-Fix-publishing-of-hostname.patch b/SOURCES/ci-Revert-azure-Fix-publishing-of-hostname.patch new file mode 100644 index 0000000..7df55c1 --- /dev/null +++ b/SOURCES/ci-Revert-azure-Fix-publishing-of-hostname.patch @@ -0,0 +1,41 @@ +From c5a88b2c987bda11b102de9ef1fca08191672a36 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Tue, 17 Apr 2018 13:07:53 +0200 +Subject: [PATCH 1/3] Revert "azure: Fix publishing of hostname" + +RH-Author: Vitaly Kuznetsov +Message-id: <20180417130754.12918-2-vkuznets@redhat.com> +Patchwork-id: 79658 +O-Subject: [RHEL7.6/7.5.z cloud-init PATCH 1/2] Revert "azure: Fix publishing of hostname" +Bugzilla: 1568717 +RH-Acked-by: Eduardo Otubo +RH-Acked-by: Mohammed Gamal +RH-Acked-by: Cathy Avery + +Turns out the downstream-only fix doesn't work, revert it. + +This reverts commit 7a2f4618ba79ff3f7c4c7d026e645647a3da25d3. + +Signed-off-by: Vitaly Kuznetsov +Signed-off-by: Miroslav Rezanina +--- + cloudinit/sources/DataSourceAzure.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py +index a0ebd2b..48a3e1d 100644 +--- a/cloudinit/sources/DataSourceAzure.py ++++ b/cloudinit/sources/DataSourceAzure.py +@@ -27,8 +27,7 @@ AGENT_START = ['service', 'walinuxagent', 'start'] + AGENT_START_BUILTIN = "__builtin__" + BOUNCE_COMMAND = [ + 'sh', '-xc', +- "i=$interface; DHCP_HOSTNAME=$hostname; x=0; " +- "ifdown $i || x=$?; ifup $i || x=$?; exit $x" ++ "i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x" + ] + # azure systems will always have a resource disk, and 66-azure-ephemeral.rules + # ensures that it gets linked to this path. +-- +1.8.3.1 + diff --git a/SOURCES/ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch b/SOURCES/ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch new file mode 100644 index 0000000..0a30b68 --- /dev/null +++ b/SOURCES/ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch @@ -0,0 +1,49 @@ +From 69de56ef080be2d017a84d1fd48ddd1fc7f2124f Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Thu, 26 Apr 2018 09:27:49 +0200 +Subject: [PATCH 3/3] sysconfig: Don't disable IPV6_AUTOCONF + +RH-Author: Vitaly Kuznetsov +Message-id: <20180426092749.7251-2-vkuznets@redhat.com> +Patchwork-id: 79904 +O-Subject: [RHEL7.6/7.5.z cloud-init PATCH 1/1] sysconfig: Don't disable IPV6_AUTOCONF +Bugzilla: 1578702 +RH-Acked-by: Mohammed Gamal +RH-Acked-by: Cathy Avery +RH-Acked-by: Eduardo Otubo + +Downstream-only commit 118458a3fb ("sysconfig: Don't write BOOTPROTO=dhcp +for ipv6 dhcp") did two things: +1) Disabled BOOTPROTO='dhcp' for dhcp6 setups. This change seems to be + correct as BOOTPROTO is unrelated to IPv6. The change was since merged + upstream (commit a57928d3c314d9568712cd190cb1e721e14c108b). +2) Explicitly disabled AUTOCONF and this broke many valid configurations + using it instead of DHCPV6C. Revert this part of the change. In case + DHCPV6C-only support is needed something like a new 'dhcpv6c_only' + network type needs to be suggested upstream. + +X-downstream-only: yes + +Resolves: rhbz#1558854 + +Signed-off-by: Vitaly Kuznetsov +Signed-off-by: Miroslav Rezanina +--- + cloudinit/net/sysconfig.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py +index ec41251..9fd4d92 100644 +--- a/cloudinit/net/sysconfig.py ++++ b/cloudinit/net/sysconfig.py +@@ -287,7 +287,6 @@ class Renderer(renderer.Renderer): + if subnet_type == 'dhcp6': + iface_cfg['IPV6INIT'] = True + iface_cfg['DHCPV6C'] = True +- iface_cfg['IPV6_AUTOCONF'] = False + elif subnet_type in ['dhcp4', 'dhcp']: + iface_cfg['BOOTPROTO'] = 'dhcp' + elif subnet_type == 'static': +-- +1.8.3.1 + diff --git a/SOURCES/cloud-init-add-centos-os.patch b/SOURCES/cloud-init-add-centos-os.patch deleted file mode 100644 index 977c156..0000000 --- a/SOURCES/cloud-init-add-centos-os.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py -index f56c0cf..1fd48a7 100755 ---- a/cloudinit/distros/__init__.py -+++ b/cloudinit/distros/__init__.py -@@ -32,7 +32,7 @@ from cloudinit.distros.parsers import hosts - - OSFAMILIES = { - 'debian': ['debian', 'ubuntu'], -- 'redhat': ['fedora', 'rhel'], -+ 'redhat': ['centos', 'fedora', 'rhel'], - 'gentoo': ['gentoo'], - 'freebsd': ['freebsd'], - 'suse': ['sles'], -diff --git a/cloudinit/distros/centos.py b/cloudinit/distros/centos.py -new file mode 100644 -index 0000000..4b803d2 ---- /dev/null -+++ b/cloudinit/distros/centos.py -@@ -0,0 +1,12 @@ -+# This file is part of cloud-init. See LICENSE file for license information. -+ -+from cloudinit.distros import rhel -+from cloudinit import log as logging -+ -+LOG = logging.getLogger(__name__) -+ -+ -+class Distro(rhel.Distro): -+ pass -+ -+# vi: ts=4 expandtab -diff -uNr cloud-init-0.7.9__orig/rhel/cloud.cfg cloud-init-0.7.9/rhel/cloud.cfg ---- cloud-init-0.7.9__orig/rhel/cloud.cfg 2017-09-05 22:20:14.302075947 +0100 -+++ cloud-init-0.7.9/rhel/cloud.cfg 2017-09-05 22:20:37.912076373 +0100 -@@ -52,7 +52,7 @@ - - system_info: - default_user: -- name: cloud-user -+ name: centos - lock_passwd: true - gecos: Cloud User - groups: [wheel, adm, systemd-journal] diff --git a/SOURCES/cloud-init-rhel.cfg b/SOURCES/cloud-init-rhel.cfg index 675df1c..986f241 100644 --- a/SOURCES/cloud-init-rhel.cfg +++ b/SOURCES/cloud-init-rhel.cfg @@ -51,7 +51,7 @@ cloud_final_modules: system_info: default_user: - name: centos + name: cloud-user lock_passwd: true gecos: Cloud User groups: [wheel, adm, systemd-journal] diff --git a/SPECS/cloud-init.spec b/SPECS/cloud-init.spec index b5712d1..ab88b70 100644 --- a/SPECS/cloud-init.spec +++ b/SPECS/cloud-init.spec @@ -7,7 +7,7 @@ Name: cloud-init Version: 0.7.9 -Release: 24%{?dist} +Release: 24%{?dist}.1 Summary: Cloud instance init scripts Group: System Environment/Base @@ -62,7 +62,12 @@ Patch0036: 0036-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch Patch0037: 0037-sysconfig-Fix-traceback.patch Patch0038: 0038-Fix-bug-that-resulted-in-an-attempt-to-rename-bonds.patch Patch0039: 0039-azure-Fix-publishing-of-hostname.patch -Patch9999: cloud-init-add-centos-os.patch +# For bz#1568717 - Add patch to bounce NICs in Azure/update DNS [rhel-7.5.z] +Patch40: ci-Revert-azure-Fix-publishing-of-hostname.patch +# For bz#1568717 - Add patch to bounce NICs in Azure/update DNS [rhel-7.5.z] +Patch41: ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch +# For bz#1578702 - cloud-init-0.7.9-9.el7_4.6 breaks IPv4/IPv6 dual-stack EC2 instances in AWS [rhel-7.5.z] +Patch42: ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch # Deal with noarch -> arch # https://bugzilla.redhat.com/show_bug.cgi?id=1067089 @@ -212,8 +217,14 @@ fi %config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf %changelog -* Wed Apr 11 2018 Johnny Hughes 0.7.9-24 -- Manual CentOS Debranding +* Thu May 17 2018 Miroslav Rezanina - 0.7.9-24.el7_5.1 +- ci-Revert-azure-Fix-publishing-of-hostname.patch [bz#1568717] +- ci-DataSourceAzure.py-use-hostnamectl-to-set-hostname.patch [bz#1568717] +- ci-sysconfig-Don-t-disable-IPV6_AUTOCONF.patch [bz#1578702] +- Resolves: bz#1568717 + (Add patch to bounce NICs in Azure/update DNS [rhel-7.5.z]) +- Resolves: bz#1578702 + (cloud-init-0.7.9-9.el7_4.6 breaks IPv4/IPv6 dual-stack EC2 instances in AWS [rhel-7.5.z]) * Tue Feb 13 2018 Ryan McCabe 0.7.9-24 - Set DHCP_HOSTNAME on Azure to allow for the hostname to be