import OL WALinuxAgent-2.7.0.6-11.0.1.el9_6.1

This commit is contained in:
Andrew Lukoshko 2025-08-07 11:08:58 +00:00
parent 9edce1a83e
commit f5b12208b3
6 changed files with 186 additions and 38 deletions

View File

@ -0,0 +1,28 @@
From 246586f31209b70667b494db30c847c5b87fe7a3 Mon Sep 17 00:00:00 2001
From: Darren Archibald <darren.archibald@oracle.com>
Date: Wed, 21 Sep 2022 05:40:34 -0700
Subject: [PATCH] Add Oracle support
Add oracle support to fix waagent.service build issue
Signed-off-by: Darren Archibald <darren.archibald@oracle.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index e4d7cf7..82ec9fe 100755
--- a/setup.py
+++ b/setup.py
@@ -96,7 +96,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
systemd_dir_path = osutil.get_systemd_unit_file_install_path()
agent_bin_path = osutil.get_agent_bin_path()
- if name in ('redhat', 'centos', 'almalinux', 'cloudlinux'): # pylint: disable=R1714
+ if name in ('redhat', 'centos', 'almalinux', 'cloudlinux', 'oracle'): # pylint: disable=R1714
if version.startswith("9"):
# redhat8+ default to py3
set_bin_files(data_files, dest=agent_bin_path,
--
2.27.0

View File

@ -13,5 +13,5 @@ depends() {
# called by dracut
install() {
inst_multiple cut readlink chmod
inst_rules 66-azure-storage.rules 99-azure-product-uuid.rules
inst_rules 10-azure-unmanaged-sriov.rules 66-azure-storage.rules 99-azure-product-uuid.rules
}

0
SOURCES/tpm2-luks-import.sh Executable file → Normal file
View File

View File

@ -0,0 +1,39 @@
From 21616a198bee14a9a95a6dacedcd1b1eca175fc6 Mon Sep 17 00:00:00 2001
From: Ani Sinha <anisinha@redhat.com>
Date: Mon, 6 May 2024 11:50:49 +0530
Subject: [PATCH] Disable automatic log collector
RH-Author: Ani Sinha <anisinha@redhat.com>
RH-MergeRequest: 11: Disable automatic log collector
RH-Jira: RHEL-7273
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [1/1] 7a8002c626b45eb5e90fa0fe82694639d1e5b93d (anisinha/centos-wa-linux-agent)
Log collector is enabled by default. Due to security concerns from our customers
disable it.
Jira: https://issues.redhat.com/browse/RHEL-7273
Upstream: RHEL only.
Signed-off-by: Ani Sinha <anisinha@redhat.com>
---
config/waagent.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/waagent.conf b/config/waagent.conf
index 14cd01c8..25ee83d3 100644
--- a/config/waagent.conf
+++ b/config/waagent.conf
@@ -73,7 +73,7 @@ Logs.Verbose=n
# Logs.Console=y
# Enable periodic log collection, default is y
-Logs.Collect=y
+Logs.Collect=n
# How frequently to collect logs, default is each hour
Logs.CollectPeriod=3600
--
2.39.3

View File

@ -0,0 +1,55 @@
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

View File

@ -2,48 +2,55 @@
%global dracut_modname_udev 97walinuxagent
%global dracut_modname_cvm 97walinuxagentcvm
Name: WALinuxAgent
Version: 2.7.0.6
Release: 9%{?dist}
Summary: The Microsoft Azure Linux Agent
Name: WALinuxAgent
Version: 2.7.0.6
Release: 11.0.1%{?dist}.1
Summary: The Microsoft Azure Linux Agent
License: ASL 2.0
URL: https://github.com/Azure/%{name}
Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz
Source1: module-setup-udev.sh
Source2: module-setup-cvm.sh
Source3: 90-tpm2-import.rules
Source4: tpm2-luks-import.sh
License: ASL 2.0
URL: https://github.com/Azure/%{name}
Source0: https://github.com/Azure/%{name}/archive/v%{version}.tar.gz
Source1: module-setup-udev.sh
Source2: module-setup-cvm.sh
Source3: 90-tpm2-import.rules
Source4: tpm2-luks-import.sh
# Python3.9 fixes
Patch0001: 0001-Initial-redhat-build-configuation.patch
Patch0002: 0002-Implement-restart_if-for-RedHat-OS.patch
Patch0001: 0001-Initial-redhat-build-configuation.patch
Patch0002: 0002-Implement-restart_if-for-RedHat-OS.patch
# For bz#2098233 - [Azure][WALA][RHEL-9] [9.1] walinuxagent kills network during boot
Patch3: wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch
Patch3: wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch
# For bz#2114830 - [Azure][WALA][RHEL-9.1] Provisioning failed if no ifcfg-eth0
Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch
Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch
# For bz#2093965 - [Azure][WALA][RHEL-9] The description of "Logs.Collect" is incorrect
Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.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
# Oracle Patch
Patch1000: 0100-add-oracle-support.patch
# Source-git patches
BuildArch: noarch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-distro
Requires: %name-udev = %version-%release
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-distro
Requires: %name-udev = %version-%release
%if 0%{?fedora}
Requires: ntfsprogs
Requires: ntfsprogs
%endif
Requires: openssh
Requires: openssh-server
Requires: openssl
Requires: parted
Requires: python3-pyasn1
Requires: iptables
Requires: openssh
Requires: openssh-server
Requires: openssl
Requires: parted
Requires: python3-pyasn1
Requires: iptables
BuildRequires: systemd
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
@ -55,25 +62,25 @@ images that are built to run in the Microsoft Azure environment.
%if 0%{?with_legacy}
%package legacy
Summary: The Microsoft Azure Linux Agent (legacy)
Requires: %name = %version-%release
Requires: python2
Requires: net-tools
Summary: The Microsoft Azure Linux Agent (legacy)
Requires: %name = %version-%release
Requires: python2
Requires: net-tools
%description legacy
The Microsoft Azure Linux Agent supporting old version of extensions.
%endif
%package udev
Summary: Udev rules for Microsoft Azure
Summary: Udev rules for Microsoft Azure
%description udev
Udev rules specific to Microsoft Azure Virtual Machines.
%package cvm
Summary: Microsoft Azure CVM specific tools
Requires: tpm2-tools
Requires: cryptsetup
Summary: Microsoft Azure CVM specific tools
Requires: tpm2-tools
Requires: cryptsetup
%description cvm
Scripts and udev rules specific to Microsoft Azure Confidential Virtual Machines.
@ -142,6 +149,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}
@ -159,6 +167,24 @@ rm -rf %{_unitdir}/waagent.service.d/
%endif
%changelog
* Tue Aug 05 2025 Craig Guiller <craig.guiller@oracle.com> - 2.7.0.6-11.0.1.el9_6.1
- Add oracle support to fix waagent.service build issue
* Tue May 06 2025 Jon Maloy <jmaloy@redhat.com> - 2.7.0.6-11.el9_6.1
- wla-redhat-Include-10-azure-unmanaged-sriov.rules-into-i.patch [RHEL-88808]
- Resolves: RHEL-88808
([Azure][ARM][RHEL-9] Kdump cannot save vmcore via ssh or nfs [rhel-9.6.z])
* Fri Jan 17 2025 Miroslav Rezanina <mrezanin@redhat.com> - 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 <mrezanin@redhat.com> - 2.7.0.6-10
- wla-Disable-automatic-log-collector.patch [RHEL-7273]
- Resolves: RHEL-7273
([Azure][WALA] Consider to disable Log collector)
* Wed Feb 08 2023 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-9
- wla-redhat-Adjust-tpm2_createprimary-key-attributes-to-m.patch [bz#2167322]
- Resolves: bz#2167322