cloud-init/SOURCES/ci-fix-Pass-interface-string-to-get_newest_lease-6648.patch
2026-06-25 09:37:17 -04:00

41 lines
1.6 KiB
Diff

From f876de91ee5537a97bc388fb814cf19a8b3b3d40 Mon Sep 17 00:00:00 2001
From: Leah <76408777+goldberl@users.noreply.github.com>
Date: Tue, 6 Jan 2026 15:01:59 -0500
Subject: [PATCH 1/3] fix: Pass interface string to get_newest_lease() (#6648)
RH-Author: Ani Sinha <anisinha@redhat.com>
RH-MergeRequest: 136: fix(cloudstack): Improve domain-name DHCP lease lookup
RH-Jira: RHEL-159095
RH-Acked-by: xiachen <xiachen@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [1/3] 71ccca47fe2eb2112472bf88978b594c95ca3436 (anisinha/cloud-init)
In DataSourceCloudStack.py, get_newest_lease() is currently being
passed a Distro object, causing a Python type error. This PR
changes the Distro object to the interface string to fix this error.
(cherry picked from commit e02b739fc094eb8b56391705c2989f4aecbe139b)
Signed-off-by: Ani Sinha <anisinha@redhat.com>
---
cloudinit/sources/DataSourceCloudStack.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py
index 61bf94f51..6d19077cd 100644
--- a/cloudinit/sources/DataSourceCloudStack.py
+++ b/cloudinit/sources/DataSourceCloudStack.py
@@ -314,7 +314,9 @@ def get_vr_address(distro):
return latest_address
with suppress(FileNotFoundError):
- latest_lease = distro.dhcp_client.get_newest_lease(distro)
+ latest_lease = distro.dhcp_client.get_newest_lease(
+ distro.fallback_interface
+ )
if latest_lease:
LOG.debug(
"Found SERVER_ADDRESS '%s' via ephemeral %s lease ",
--
2.47.3