File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Summary: Cloud instance init scripts
22Name: cloud-init
33Version: 23.4.1
4- Release: 3 %{?dist }
4+ Release: 4 %{?dist }
55License: GPLv3
66Vendor: Microsoft Corporation
77Distribution: Mariner
@@ -11,6 +11,7 @@ Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{na
1111Source1: 10-azure-kvp.cfg
1212Patch0: Retain-exit-code-in-cloud-init-status-for-recoverabl.patch
1313Patch1: ci-Pin-pytest-8.0.0.patch
14+ Patch2: exec_cmd_error_handling.patch
1415%define cl_services cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local .service
1516BuildRequires: automake
1617BuildRequires: dbus
@@ -146,6 +147,9 @@ make check %{?_smp_mflags}
146147%config(noreplace) %{_sysconfdir }/cloud/cloud.cfg.d/10-azure-kvp.cfg
147148
148149%changelog
150+ * Wed Mar 13 2024 Minghe Ren <mingheren@microsoft.com> - 23.4.1-4
151+ - Add patch to resolve error handling approach when executing command
152+
149153* Fri Feb 09 2024 Chris Co <chrco@microsoft.com> - 23.4.1-3
150154- Add patch to pin pytest to <8.0.0 so cloud-init tests run correctly
151155
Original file line number Diff line number Diff line change 1+ diff -ruN a/cloudinit/distros/photon.py b/cloudinit/distros/photon.py
2+ --- a/cloudinit/distros/photon.py 2023-12-14 09:17:35.000000000 -0800
3+ +++ b/cloudinit/distros/photon.py 2024-03-20 14:34:15.375591963 -0700
4+ @@ -45,7 +45,6 @@
5+ LOG.warning(
6+ "Running %s resulted in stderr output: %s", cmd, err
7+ )
8+ - return True, out, err
9+ return False, out, err
10+ except subp.ProcessExecutionError:
11+ util.logexc(LOG, "Command %s failed", cmd)
12+ diff -ruN a/tests/unittests/distros/test_photon.py b/tests/unittests/distros/test_photon.py
13+ --- a/tests/unittests/distros/test_photon.py 2023-12-14 09:17:35.000000000 -0800
14+ +++ b/tests/unittests/distros/test_photon.py 2024-03-20 14:57:38.141906589 -0700
15+ @@ -42,11 +42,6 @@
16+ ret = self.distro._read_hostname(hostfile)
17+ self.assertEqual(ret, hostname)
18+
19+ - self.logs.truncate(0)
20+ - m_subp.return_value = (None, "bla")
21+ - self.distro._write_hostname(hostname, None)
22+ - self.assertIn("Error while setting hostname", self.logs.getvalue())
23+ -
24+ @mock.patch("cloudinit.net.generate_fallback_config")
25+ def test_fallback_netcfg(self, m_fallback_cfg):
You can’t perform that action at this time.
0 commit comments