- wla-redhat-Add-a-udev-rule-to-avoid-managing-slave-NICs-.patch [RHEL-68796] - Resolves: RHEL-68796 (Please add `mana` to 99-azure-unmanaged-devices.conf of Azure image)
56 lines
2.4 KiB
Diff
56 lines
2.4 KiB
Diff
From dd3a8f78ef32aed2f1267dd7dd495c65edd259a1 Mon Sep 17 00:00:00 2001
|
|
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
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 <vkuznets@redhat.com>
|
|
RH-MergeRequest: 15: redhat: Add a udev rule to avoid managing slave NICs with NetworkManager
|
|
RH-Jira: RHEL-68796
|
|
RH-Acked-by: Ani Sinha <anisinha@redhat.com>
|
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
RH-Acked-by: Cathy Avery <cavery@redhat.com>
|
|
RH-Commit: [1/1] f6a5ab0e22831b67fc48afc8e80b724fcb9c8503 (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 <vkuznets@redhat.com>
|
|
---
|
|
config/10-azure-unmanaged-sriov.rules | 6 ++++++
|
|
setup.py | 3 ++-
|
|
2 files changed, 8 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 8f5d92b4..f76aff30 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
|
|
|