spec: add gcp-hostname.patch

This commit is contained in:
Michael Nguyen 2024-02-01 17:57:46 -05:00 committed by root
parent b18c8b3880
commit d133862883
3 changed files with 34 additions and 1 deletions

2
.rust-afterburn.metadata Normal file
View File

@ -0,0 +1,2 @@
dbef61cf7e7e4d51b5b0f8acfffcecb0f295caea afterburn-5.5.1.crate
e70241437c228d9b030a59933502b7355e96e723 afterburn-5.5.1-vendor.tar.gz

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}
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 <mnguyen@redhat.com> - 5.5.1-2
- Add gcp-hostname.patch
* Tue Jan 23 2024 Michael Nguyen <mnguyen@redhat.com> - 5.5.1-1
- New release
- Update legacy-providers patch to work with new release source