From c158f4fe082be632bd16d198f534752aeca17732 Mon Sep 17 00:00:00 2001 From: Michael Nguyen Date: Thu, 1 Feb 2024 17:57:46 -0500 Subject: [PATCH] spec: add gcp-hostname.patch This patch was downstream but makes more sense to live upstream. --- gcp-hostname.patch | 27 +++++++++++++++++++++++++++ rust-afterburn.spec | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gcp-hostname.patch diff --git a/gcp-hostname.patch b/gcp-hostname.patch new file mode 100644 index 0000000..f8bfcf1 --- /dev/null +++ b/gcp-hostname.patch @@ -0,0 +1,27 @@ +From d613c69d4b133b0287c5205118a2df992c3962a0 Mon Sep 17 00:00:00 2001 +From: Michael Nguyen +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 + diff --git a/rust-afterburn.spec b/rust-afterburn.spec index 8b44b0a..98f9c55 100644 --- a/rust-afterburn.spec +++ b/rust-afterburn.spec @@ -8,7 +8,7 @@ Name: rust-%{crate} Version: 5.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple cloud provider agent (RHEL CoreOS only) # 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 # from OCP 4.1 and 4.2 bootimages still call them by those names Patch0: legacy-providers.patch +Patch1: gcp-hostname.patch ExclusiveArch: %{rust_arches} %if 0%{?rhel} && !0%{?eln} @@ -147,6 +148,9 @@ cp -a dracut/* %{buildroot}%{dracutmodulesdir} %endif %changelog +* Thu Feb 1 2024 Michael Nguyen - 5.5.1-2 +- Add gcp-hostname.patch + * Tue Jan 23 2024 Michael Nguyen - 5.5.1-1 - New release - Update legacy-providers patch to work with new release source