56 lines
2.4 KiB
Diff
56 lines
2.4 KiB
Diff
From 7841f8f9c4a76fc3519202a9c6bebf9697a08e19 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: 16: redhat: Add a udev rule to avoid managing slave NICs with NetworkManager
|
|
RH-Jira: RHEL-5880
|
|
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
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 <vkuznets@redhat.com>
|
|
---
|
|
.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
|
|
|