Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Nguyen d133862883 spec: add gcp-hostname.patch 2024-02-07 04:36:12 +00:00
Michael Nguyen b18c8b3880 spec: new upstream version 5.5.1
Resolves: #RHEL-22447
2024-01-25 10:02:40 -05:00
6 changed files with 47 additions and 8 deletions

2
.gitignore vendored
View File

@ -21,3 +21,5 @@
/afterburn-5.4.1-vendor.tar.gz
/afterburn-5.4.3.crate
/afterburn-5.4.3-vendor.tar.gz
/afterburn-5.5.1.crate
/afterburn-5.5.1-vendor.tar.gz

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

@ -1,8 +1,8 @@
diff --git a/src/metadata.rs b/src/metadata.rs
index ececef15e11e..36f556789159 100644
index f27dc7e..4562459 100644
--- a/src/metadata.rs
+++ b/src/metadata.rs
@@ -49,6 +49,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
@@ -51,6 +51,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
match provider {
"aliyun" => box_result!(AliyunProvider::try_new()?),
"aws" => box_result!(AwsProvider::try_new()?),
@ -10,11 +10,11 @@ index ececef15e11e..36f556789159 100644
"azure" => box_result!(Azure::try_new()?),
"azurestack" => box_result!(AzureStack::try_new()?),
"cloudstack-metadata" => box_result!(CloudstackNetwork::try_new()?),
@@ -56,6 +57,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
@@ -58,6 +59,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
"digitalocean" => box_result!(DigitalOceanProvider::try_new()?),
"exoscale" => box_result!(ExoscaleProvider::try_new()?),
"gcp" => box_result!(GcpProvider::try_new()?),
+ "gce" => box_result!(GcpProvider::try_new()?),
"hetzner" => box_result!(HetznerProvider::try_new()?),
// IBM Cloud - VPC Generation 2.
"ibmcloud" => box_result!(IBMGen2Provider::try_new()?),
// IBM Cloud - Classic infrastructure.

View File

@ -7,8 +7,8 @@
%global crate afterburn
Name: rust-%{crate}
Version: 5.4.3
Release: 1%{?dist}
Version: 5.5.1
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,13 @@ 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
* Thu Jun 08 2023 Steven Presti <spresti@redhat.com> - 5.4.3-1
- New release

View File

@ -1,2 +1,2 @@
SHA512 (afterburn-5.4.3.crate) = 265a384f1c02b2ec3c5876d09f22a285967f064b5dceec0ef93091463f66a1461891dc45576525ae4b980be7ad78ea07e21050240011313dc0e79d75b5a89b0e
SHA512 (afterburn-5.4.3-vendor.tar.gz) = 3de6b074f9f68395dd6b309f3ce5c6843cddbdbbc303242ad1484e773190f4c7aca9e87c9e0dc1fc51c7f03b0d028f6cd12ac09ae0dca5c2afedd0253f65c6be
SHA512 (afterburn-5.5.1.crate) = f937aafccbdfc49486b184fba2d99115407b90bf5ca54cf0d5de228a96f97a4e700f2fb96c7c0dc325d0989e99bd6d771d798ffec13172bde51b0115290bb3cc
SHA512 (afterburn-5.5.1-vendor.tar.gz) = d58006184740e0f4b9a4321d4fd7dadc9ca683d440526cd3b689a914832f4a60b05a989b59291189d8f14158f807e34a9e3c6329ee7240faf44749a4745c675d