Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud init lisa #11423

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion SPECS/cloud-init/cloud-init.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: Cloud instance init scripts
Name: cloud-init
Version: 24.3.1
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3
Vendor: Microsoft Corporation
Distribution: Azure Linux
Expand All @@ -11,6 +11,7 @@ Source0: https://github.com/canonical/%{name}/archive/refs/tags/%{version
Source1: 10-azure-kvp.cfg
Patch0: Add-Network-Interface-Renaming-Support-for-CAPM3-Met.patch
Patch1: no-single-process.patch
Patch2: network_renaming.patch
%define cl_services cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
BuildRequires: automake
BuildRequires: dbus
Expand Down Expand Up @@ -142,6 +143,9 @@ make check %{?_smp_mflags}
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/10-azure-kvp.cfg

%changelog
* Wed Dec 11 2024 Minghe Ren <[email protected]> - 24.3.1-2
- Add patch to avoid cloud-init nics renaming race condition

* Tue Oct 01 2024 Minghe Ren <[email protected]> - 24.3.1-1
- Upgrade cloud-init to 24.3.1 to support azure-proxy-agent
- Add upstream patch no-single-process.patch to revert a behavior change on cloud-init systemd
Expand Down
21 changes: 21 additions & 0 deletions SPECS/cloud-init/network_renaming.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -ruN a/cloudinit/net/netops/iproute2.py b/cloudinit/net/netops/iproute2.py
--- a/cloudinit/net/netops/iproute2.py 2024-09-04 12:01:58.000000000 -0700
+++ b/cloudinit/net/netops/iproute2.py 2024-12-11 17:00:35.590222604 -0800
@@ -2,7 +2,7 @@

from cloudinit import subp
from cloudinit.net.netops import NetOps
-
+import time

class Iproute2(NetOps):
@staticmethod
@@ -30,6 +30,7 @@
@staticmethod
def link_rename(current_name: str, new_name: str):
subp.subp(["ip", "link", "set", current_name, "name", new_name])
+ time.sleep(0.5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an upstream-provided fix? I'm concerned seeing a sleep call get added to address what is being labeled a race condition. It tends to sweep the true root cause under the rug, and often runs the risk of still not mitigating the issue appropriately for some percentage of scenarios.


@staticmethod
def add_route(

Loading