Skip to content

Commit fac013d

Browse files
committed
Revert "fix: upgrade cloud-init to v23.4.1 (#7065)"
This reverts commit fc07dc5.
1 parent c93e9e4 commit fac013d

4 files changed

Lines changed: 41 additions & 9 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
33
"10-azure-kvp.cfg": "79e0370c010be5cd4717960e4b414570c9ec6e6d29aede77ccecc43d2b03bb9a",
4-
"cloud-init-23.4.1.tar.gz": "f12d207cf147ab981787487d38cda09ee71975505df224c96a6cf1d59f53ca2f"
4+
"cloud-init-23.3.tar.gz": "1a5a54369f78891b79f43061c1ff0fb31e2bd74ff9527d7150ddd6517c3e2b07"
55
}
66
}

SPECS/cloud-init/cloud-init.spec

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Summary: Cloud instance init scripts
22
Name: cloud-init
3-
Version: 23.4.1
3+
Version: 23.3
44
Release: 1%{?dist}
55
License: GPLv3
66
Vendor: Microsoft Corporation
@@ -9,6 +9,7 @@ Group: System Environment/Base
99
URL: https://launchpad.net/cloud-init
1010
Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz
1111
Source1: 10-azure-kvp.cfg
12+
Patch0: overrideDatasourceDetection.patch
1213
%define cl_services cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
1314
BuildRequires: automake
1415
BuildRequires: dbus
@@ -79,7 +80,7 @@ python3 setup.py build
7980
%install
8081
%{py3_install "--init-system=systemd"}
8182

82-
python3 tools/render-template --variant mariner > %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
83+
python3 tools/render-cloudcfg --variant mariner > %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
8384
sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," %{buildroot}/%{python3_sitelib}/cloudinit/version.py
8485

8586
%if "%{_arch}" == "aarch64"
@@ -142,10 +143,6 @@ make check %{?_smp_mflags}
142143
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/10-azure-kvp.cfg
143144

144145
%changelog
145-
* Tue Dec 19 2023 Chris Co <chrco@microsoft.com> - 23.4.1-1
146-
- Upgrade cloud-init to 23.4.1
147-
- Remove overrideDatasourceDetection patch since it is now in 23.4 source
148-
149146
* Tue Oct 10 2023 Minghe Ren <mingheren@microsoft.com> - 23.3-1
150147
- Upgrade to cloud-init 23.3 and remove unnecessary testGetInterfacesUnitTest.patch
151148

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 35988cc4452f7df42e3c1b462731489bd33dade6 Mon Sep 17 00:00:00 2001
2+
From: Chris Patterson <cpatterson@microsoft.com>
3+
Date: Mon, 11 Sep 2023 16:56:06 -0400
4+
Subject: [PATCH] sources: do not override datasource detection if None is in
5+
list
6+
7+
Users with datasource_list = [Azure, None] started failing to boot
8+
properly outside of Azure with the changes to override datasource detection.
9+
10+
If the fallback "None" is included in the datasource_list, do not treat
11+
the system as configured with a single datasource.
12+
13+
If users want to force a single datasource regardless of detection,
14+
they can do so by removing None from the list.
15+
16+
Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
17+
---
18+
cloudinit/sources/__init__.py | 5 +----
19+
1 file changed, 1 insertion(+), 4 deletions(-)
20+
21+
diff -ruN a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
22+
--- a/cloudinit/sources/__init__.py 2023-08-28 09:20:24.000000000 -0700
23+
+++ b/cloudinit/sources/__init__.py 2023-09-13 15:00:23.287549869 -0700
24+
@@ -352,10 +352,7 @@
25+
self,
26+
)
27+
return True
28+
- elif self.sys_cfg.get("datasource_list", []) in (
29+
- [self.dsname],
30+
- [self.dsname, "None"],
31+
- ):
32+
+ elif self.sys_cfg.get("datasource_list", []) == [self.dsname]:
33+
LOG.debug(
34+
"Machine is configured to run on single datasource %s.", self
35+
)

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,8 +1807,8 @@
18071807
"type": "other",
18081808
"other": {
18091809
"name": "cloud-init",
1810-
"version": "23.4.1",
1811-
"downloadUrl": "https://launchpad.net/cloud-init/trunk/23.4.1/+download/cloud-init-23.4.1.tar.gz"
1810+
"version": "23.3",
1811+
"downloadUrl": "https://launchpad.net/cloud-init/trunk/23.3/+download/cloud-init-23.3.tar.gz"
18121812
}
18131813
}
18141814
},

0 commit comments

Comments
 (0)