forked from rpms/cloud-init
- Check for null ssh_genkeytypes value in cloud.cfg that breaks ssh connectivity after upgrade to a newer version of cloud-init.
This commit is contained in:
parent
c5d22940af
commit
d6635242f0
@ -107,54 +107,17 @@ index 14ac77e..7cd14a1 100644
|
|||||||
for item in items:
|
for item in items:
|
||||||
try:
|
try:
|
||||||
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
|
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
|
||||||
index 80ab4f9..ce63c1b 100644
|
|
||||||
--- a/config/cloud.cfg.tmpl
|
--- a/config/cloud.cfg.tmpl
|
||||||
+++ b/config/cloud.cfg.tmpl
|
+++ b/config/cloud.cfg.tmpl
|
||||||
@@ -34,7 +34,7 @@ disable_root: true
|
@@ -2,7 +2,7 @@
|
||||||
|
# The top level settings are used as module
|
||||||
{% if variant in ["almalinux", "alpine", "amazon", "centos", "cloudlinux", "eurolinux",
|
# and system configuration.
|
||||||
"fedora", "miraclelinux", "openEuler", "rhel", "rocky", "virtuozzo"] %}
|
{% set is_bsd = variant in ["dragonfly", "freebsd", "netbsd", "openbsd"] %}
|
||||||
-{% if variant == "rhel" %}
|
-{% set is_rhel = variant in ["rhel", "centos"] %}
|
||||||
+{% if variant in ["almalinux", "rhel"] %}
|
+{% set is_rhel = variant in ["rhel", "centos", "almalinux"] %}
|
||||||
mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service,_netdev', '0', '2']
|
{% if is_bsd %}
|
||||||
{% else %}
|
syslog_fix_perms: root:wheel
|
||||||
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
|
{% elif variant in ["suse"] %}
|
||||||
@@ -70,7 +70,7 @@ network:
|
|
||||||
config: disabled
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
-{% if variant == "rhel" %}
|
|
||||||
+{% if variant in ["almalinux", "rhel"] %}
|
|
||||||
# Default redhat settings:
|
|
||||||
ssh_deletekeys: true
|
|
||||||
ssh_genkeytypes: ['rsa', 'ecdsa', 'ed25519']
|
|
||||||
@@ -119,7 +119,7 @@ cloud_config_modules:
|
|
||||||
{% endif %}
|
|
||||||
{% if variant not in ["photon"] %}
|
|
||||||
- ssh-import-id
|
|
||||||
-{% if variant not in ["rhel"] %}
|
|
||||||
+{% if variant not in ["almalinux", "rhel"] %}
|
|
||||||
- keyboard
|
|
||||||
{% endif %}
|
|
||||||
- locale
|
|
||||||
@@ -128,7 +128,7 @@ cloud_config_modules:
|
|
||||||
{% if variant in ["rhel"] %}
|
|
||||||
- rh_subscription
|
|
||||||
{% endif %}
|
|
||||||
-{% if variant in ["rhel", "fedora", "photon"] %}
|
|
||||||
+{% if variant in ["almalinux", "rhel", "fedora", "photon"] %}
|
|
||||||
{% if variant not in ["photon"] %}
|
|
||||||
- spacewalk
|
|
||||||
{% endif %}
|
|
||||||
@@ -275,7 +275,7 @@ system_info:
|
|
||||||
groups: [adm, sudo]
|
|
||||||
{% elif variant == "arch" %}
|
|
||||||
groups: [wheel, users]
|
|
||||||
-{% elif variant == "rhel" %}
|
|
||||||
+{% elif variant in ["almalinux", "rhel"] %}
|
|
||||||
groups: [adm, systemd-journal]
|
|
||||||
{% else %}
|
|
||||||
groups: [wheel, adm, systemd-journal]
|
|
||||||
diff --git a/packages/pkg-deps.json b/packages/pkg-deps.json
|
diff --git a/packages/pkg-deps.json b/packages/pkg-deps.json
|
||||||
index eaf1346..0aa70f6 100644
|
index eaf1346..0aa70f6 100644
|
||||||
--- a/packages/pkg-deps.json
|
--- a/packages/pkg-deps.json
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: cloud-init
|
Name: cloud-init
|
||||||
Version: 22.1
|
Version: 22.1
|
||||||
Release: 8%{?dist}.alma
|
Release: 8%{?dist}.1.alma
|
||||||
Summary: Cloud instance init scripts
|
Summary: Cloud instance init scripts
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -170,7 +170,28 @@ if [ $1 -eq 1 ] ; then
|
|||||||
/bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
|
/bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl enable cloud-init.target >/dev/null 2>&1 || :
|
/bin/systemctl enable cloud-init.target >/dev/null 2>&1 || :
|
||||||
elif [ $1 -eq 2 ]; then
|
elif [ $1 -eq 2 ]; then
|
||||||
# Upgrade. If the upgrade is from a version older than 0.7.9-8,
|
# Changes from upstream - https://gitlab.com/redhat/centos-stream/rpms/cloud-init/-/commit/904e611fc228001adc0febb0218eebbca6a56dd7
|
||||||
|
# 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
|
# there will be stale systemd config
|
||||||
/bin/systemctl is-enabled cloud-config.service >/dev/null 2>&1 &&
|
/bin/systemctl is-enabled cloud-config.service >/dev/null 2>&1 &&
|
||||||
/bin/systemctl reenable cloud-config.service >/dev/null 2>&1 || :
|
/bin/systemctl reenable cloud-config.service >/dev/null 2>&1 || :
|
||||||
@ -239,6 +260,10 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
%config(noreplace) %{_sysconfdir}/rsyslog.d/21-cloudinit.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 02 2023 Eduard Abdullin <eabdullin@almalinux.org> - 22.1-8.1.alma
|
||||||
|
- Check for null ssh_genkeytypes value in cloud.cfg that
|
||||||
|
breaks ssh connectivity after upgrade to a newer version of cloud-init.
|
||||||
|
|
||||||
* Tue May 16 2023 Elkhan Mammadli <elkhan@almalinux.org> - 22.1-8.alma
|
* Tue May 16 2023 Elkhan Mammadli <elkhan@almalinux.org> - 22.1-8.alma
|
||||||
- Fix and Improve AlmaLinux support
|
- Fix and Improve AlmaLinux support
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user