diff --git a/WALinuxAgent.spec b/WALinuxAgent.spec index 709dd15..9746190 100644 --- a/WALinuxAgent.spec +++ b/WALinuxAgent.spec @@ -4,7 +4,7 @@ Name: WALinuxAgent Version: 2.7.0.6 -Release: 10%{?dist} +Release: 11%{?dist} Summary: The Microsoft Azure Linux Agent License: ASL 2.0 @@ -26,6 +26,8 @@ Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch # For RHEL-7273 - [Azure][WALA] Consider to disable Log collector Patch6: wla-Disable-automatic-log-collector.patch +# For RHEL-5880 - [Azure][RHEL-9]68-azure-sriov-nm-unmanaged.rules cannot stop NetworkManager-wait-online.service checking SRIOV interface +Patch7: wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch # Source-git patches @@ -144,6 +146,7 @@ rm -rf %{_unitdir}/waagent.service.d/ %{python3_sitelib}/*.egg-info %files udev +%{_udevrulesdir}/10-azure-unmanaged-sriov.rules %{_udevrulesdir}/66-azure-storage.rules %{_udevrulesdir}/99-azure-product-uuid.rules %dir %{_prefix}/lib/dracut/modules.d/%{dracut_modname_udev} @@ -161,6 +164,11 @@ rm -rf %{_unitdir}/waagent.service.d/ %endif %changelog +* Fri Jan 17 2025 Miroslav Rezanina - 2.7.0.6-11 +- wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch [RHEL-5880] +- Resolves: RHEL-5880 + ([Azure][RHEL-9]68-azure-sriov-nm-unmanaged.rules cannot stop NetworkManager-wait-online.service checking SRIOV interface) + * Thu May 09 2024 Miroslav Rezanina - 2.7.0.6-10 - wla-Disable-automatic-log-collector.patch [RHEL-7273] - Resolves: RHEL-7273 diff --git a/wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch b/wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch new file mode 100644 index 0000000..f61a634 --- /dev/null +++ b/wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch @@ -0,0 +1,55 @@ +From 7841f8f9c4a76fc3519202a9c6bebf9697a08e19 Mon Sep 17 00:00:00 2001 +From: Vitaly Kuznetsov +Date: Mon, 6 Jan 2025 17:13:11 +0100 +Subject: [PATCH] redhat: Add a udev rule to avoid managing slave NICs with + NetworkManager + +RH-Author: Vitaly Kuznetsov +RH-MergeRequest: 16: redhat: Add a udev rule to avoid managing slave NICs with NetworkManager +RH-Jira: RHEL-5880 +RH-Acked-by: Emanuele Giuseppe Esposito +RH-Acked-by: Miroslav Rezanina +RH-Commit: [1/1] 8d0a87117c847aafec5fa97d3e4e74ade531c033 (vkuznets/WALinuxAgentCentOS) + +This is borrowed from https://github.com/Azure/azure-vm-utils/pull/41 and +the long term plan is to get azure-vm-utils packaged for RHEL +eventually. For the time being, just put the required udev rule into +WALinuxAgent package. + +Signed-off-by: Vitaly Kuznetsov +--- + .distro/WALinuxAgent.spec | 1 + + config/10-azure-unmanaged-sriov.rules | 6 ++++++ + setup.py | 3 ++- + 3 files changed, 9 insertions(+), 1 deletion(-) + create mode 100644 config/10-azure-unmanaged-sriov.rules + +diff --git a/config/10-azure-unmanaged-sriov.rules b/config/10-azure-unmanaged-sriov.rules +new file mode 100644 +index 00000000..7eefcb26 +--- /dev/null ++++ b/config/10-azure-unmanaged-sriov.rules +@@ -0,0 +1,6 @@ ++# Azure VMs with accelerated networking may have MANA, mlx4, or mlx5 SR-IOV devices which are transparently bonded to a synthetic ++# hv_netvsc device. Mark devices with the IFF_SLAVE bit set as unmanaged devices: ++# AZURE_UNMANAGED_SRIOV=1 for 10-azure-unmanaged-sriov.network ++# ID_NET_MANAGED_BY=unmanaged for systemd-networkd >= 255 ++# NM_UNMANAGED=1 for NetworkManager ++SUBSYSTEM=="net", ACTION!="remove", DRIVERS=="mana|mlx4_core|mlx5_core", ATTR{flags}=="0x?[89ABCDEF]??", ENV{AZURE_UNMANAGED_SRIOV}="1", ENV{ID_NET_MANAGED_BY}="unmanaged", ENV{NM_UNMANAGED}="1" +diff --git a/setup.py b/setup.py +index e4d7cf7e..ab75563e 100755 +--- a/setup.py ++++ b/setup.py +@@ -82,7 +82,8 @@ def set_openbsd_rc_files(data_files, dest="/etc/rc.d/", src=None): + + def set_udev_files(data_files, dest="/etc/udev/rules.d/", src=None): + if src is None: +- src = ["config/66-azure-storage.rules", ++ src = ["config/10-azure-unmanaged-sriov.rules", ++ "config/66-azure-storage.rules", + "config/99-azure-product-uuid.rules"] + data_files.append((dest, src)) + +-- +2.39.3 +