spec: add gcp-hostname.patch

This patch was downstream but makes more sense to live upstream.
This commit is contained in:
Michael Nguyen 2024-02-01 17:57:46 -05:00
parent b18c8b3880
commit c158f4fe08
2 changed files with 32 additions and 1 deletions

27
gcp-hostname.patch Normal file
View File

@ -0,0 +1,27 @@
From d613c69d4b133b0287c5205118a2df992c3962a0 Mon Sep 17 00:00:00 2001
From: Michael Nguyen <mnguyen@redhat.com>
Date: Thu, 1 Feb 2024 17:20:24 -0500
Subject: [PATCH] Turn on Afterburn hostname support for GCP
On GCP the DHCP server send the FQDN as the shortname in DHCP.
So when the code that truncates the hostname in the kubelet runs,
NM gets ornery that it didn't change the hostname and flips it back to the long name
---
dracut/30afterburn/afterburn-hostname.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut/30afterburn/afterburn-hostname.service b/dracut/30afterburn/afterburn-hostname.service
index 485cd82..8c55a9a 100644
--- a/dracut/30afterburn/afterburn-hostname.service
+++ b/dracut/30afterburn/afterburn-hostname.service
@@ -9,6 +9,7 @@ ConditionKernelCommandLine=|ignition.platform.id=azure
ConditionKernelCommandLine=|ignition.platform.id=azurestack
ConditionKernelCommandLine=|ignition.platform.id=digitalocean
ConditionKernelCommandLine=|ignition.platform.id=exoscale
+ConditionKernelCommandLine=|ignition.platform.id=gcp
ConditionKernelCommandLine=|ignition.platform.id=hetzner
ConditionKernelCommandLine=|ignition.platform.id=ibmcloud
ConditionKernelCommandLine=|ignition.platform.id=kubevirt
--
2.43.0

View File

@ -8,7 +8,7 @@
Name: rust-%{crate} Name: rust-%{crate}
Version: 5.5.1 Version: 5.5.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Simple cloud provider agent (RHEL CoreOS only) Summary: Simple cloud provider agent (RHEL CoreOS only)
# Upstream license specification: Apache-2.0 # Upstream license specification: Apache-2.0
@ -19,6 +19,7 @@ Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}
# Re-add support for "ec2" and "gce" providers, since RHCOS nodes installed # Re-add support for "ec2" and "gce" providers, since RHCOS nodes installed
# from OCP 4.1 and 4.2 bootimages still call them by those names # from OCP 4.1 and 4.2 bootimages still call them by those names
Patch0: legacy-providers.patch Patch0: legacy-providers.patch
Patch1: gcp-hostname.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
%if 0%{?rhel} && !0%{?eln} %if 0%{?rhel} && !0%{?eln}
@ -147,6 +148,9 @@ cp -a dracut/* %{buildroot}%{dracutmodulesdir}
%endif %endif
%changelog %changelog
* Thu Feb 1 2024 Michael Nguyen <mnguyen@redhat.com> - 5.5.1-2
- Add gcp-hostname.patch
* Tue Jan 23 2024 Michael Nguyen <mnguyen@redhat.com> - 5.5.1-1 * Tue Jan 23 2024 Michael Nguyen <mnguyen@redhat.com> - 5.5.1-1
- New release - New release
- Update legacy-providers patch to work with new release source - Update legacy-providers patch to work with new release source