41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From c016e0c7521f45e343874e8df6da857be64c5ea7 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: 178: fix(cloudstack): Improve domain-name DHCP lease lookup
|
|
RH-Jira: RHEL-159032
|
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
RH-Acked-by: xiachen <xiachen@redhat.com>
|
|
RH-Commit: [1/3] a5eb297936e0253fc93e9ba4808af8d5636eb285
|
|
|
|
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 61bf94f5..6d19077c 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
|
|
|