Compare commits
5 Commits
c8
...
a8-depreca
Author | SHA1 | Date | |
---|---|---|---|
|
e25cc69288 | ||
|
0b978c9aef | ||
9ad54fb774 | |||
|
774d95d319 | ||
19bfe138ed |
101
SOURCES/WALinuxAgent-2.3-almalinux_support.patch
Normal file
101
SOURCES/WALinuxAgent-2.3-almalinux_support.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From 958d73ebc8c196dd30e9768d3e9cf1bdb6d32e25 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
|
||||
Date: Thu, 1 Apr 2021 17:19:08 +0300
|
||||
Subject: [PATCH 1/3] added AlmaLinux
|
||||
|
||||
---
|
||||
azurelinuxagent/common/osutil/factory.py | 2 +-
|
||||
azurelinuxagent/pa/rdma/factory.py | 2 +-
|
||||
setup.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py
|
||||
index b212c38253..4a09544c4d 100644
|
||||
--- a/azurelinuxagent/common/osutil/factory.py
|
||||
+++ b/azurelinuxagent/common/osutil/factory.py
|
||||
@@ -98,7 +98,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
|
||||
|
||||
return DebianOSBaseUtil()
|
||||
|
||||
- if distro_name in ("redhat", "rhel", "centos", "oracle"):
|
||||
+ if distro_name in ("redhat", "rhel", "centos", "oracle", "almalinux"):
|
||||
if Version(distro_version) < Version("7"):
|
||||
return Redhat6xOSUtil()
|
||||
|
||||
diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py
|
||||
index d86d8b8f49..e19f2fe918 100644
|
||||
--- a/azurelinuxagent/pa/rdma/factory.py
|
||||
+++ b/azurelinuxagent/pa/rdma/factory.py
|
||||
@@ -38,7 +38,7 @@ def get_rdma_handler(
|
||||
):
|
||||
return SUSERDMAHandler()
|
||||
|
||||
- if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server':
|
||||
+ if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server' or distro_full_name == 'AlmaLinux':
|
||||
return CentOSRDMAHandler(distro_version)
|
||||
|
||||
if distro_full_name == 'Ubuntu':
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c258e4b878..8ebdde5e50 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -97,7 +97,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
|
||||
agent_bin_path = osutil.get_agent_bin_path()
|
||||
|
||||
set_bin_files(data_files, dest=agent_bin_path)
|
||||
- if name == 'redhat' or name == 'centos': # pylint: disable=R1714
|
||||
+ if name == 'redhat' or name == 'centos' or name == 'almalinux': # pylint: disable=R1714
|
||||
set_conf_files(data_files)
|
||||
set_logrotate_files(data_files)
|
||||
set_udev_files(data_files)
|
||||
|
||||
From 74e3b01b6be8014c4da92c30d8ac7464cb2d381e Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
|
||||
Date: Fri, 2 Apr 2021 16:06:56 +0300
|
||||
Subject: [PATCH 2/3] added test for AlmaLinux
|
||||
|
||||
---
|
||||
tests/common/osutil/test_factory.py | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tests/common/osutil/test_factory.py b/tests/common/osutil/test_factory.py
|
||||
index f7d46b21a4..4ab234131b 100644
|
||||
--- a/tests/common/osutil/test_factory.py
|
||||
+++ b/tests/common/osutil/test_factory.py
|
||||
@@ -237,6 +237,13 @@ def test_get_osutil_it_should_return_redhat(self):
|
||||
self.assertTrue(isinstance(ret, RedhatOSUtil))
|
||||
self.assertEqual(ret.get_service_name(), "waagent")
|
||||
|
||||
+ ret = _get_osutil(distro_name="almalinux",
|
||||
+ distro_code_name="",
|
||||
+ distro_full_name="",
|
||||
+ distro_version="8")
|
||||
+ self.assertTrue(isinstance(ret, RedhatOSUtil))
|
||||
+ self.assertEqual(ret.get_service_name(), "waagent")
|
||||
+
|
||||
def test_get_osutil_it_should_return_euleros(self):
|
||||
ret = _get_osutil(distro_name="euleros",
|
||||
distro_code_name="",
|
||||
|
||||
From c9eb420d4a6ce69d2c668deef273a446e73fe2d0 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Kravchenko <akravchenko@cloudlinux.com>
|
||||
Date: Thu, 20 May 2021 13:48:17 +0300
|
||||
Subject: [PATCH 3/3] improved
|
||||
|
||||
---
|
||||
azurelinuxagent/pa/rdma/factory.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/azurelinuxagent/pa/rdma/factory.py b/azurelinuxagent/pa/rdma/factory.py
|
||||
index e19f2fe918..c6d808117b 100644
|
||||
--- a/azurelinuxagent/pa/rdma/factory.py
|
||||
+++ b/azurelinuxagent/pa/rdma/factory.py
|
||||
@@ -38,7 +38,7 @@ def get_rdma_handler(
|
||||
):
|
||||
return SUSERDMAHandler()
|
||||
|
||||
- if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server' or distro_full_name == 'AlmaLinux':
|
||||
+ if distro_full_name in ('CentOS Linux', 'CentOS', 'Red Hat Enterprise Linux Server', 'AlmaLinux'):
|
||||
return CentOSRDMAHandler(distro_version)
|
||||
|
||||
if distro_full_name == 'Ubuntu':
|
@ -1,45 +0,0 @@
|
||||
From 85638d1238ba9ab0c77138133ab1b7c7069e3821 Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Date: Tue, 21 Feb 2023 10:29:52 +0100
|
||||
Subject: [PATCH 2/2] Use platform-python in waagent.service
|
||||
|
||||
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
RH-MergeRequest: 16: Use platform-python in waagent.service
|
||||
RH-Bugzilla: 2170104
|
||||
RH-Acked-by: Mohamed Gamal Morsy <mmorsy@redhat.com>
|
||||
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
RH-Commit: [2/2] e548a4d37bd89e6e2eb471b5193b76f1f9f9529b
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2170104
|
||||
Upstream: RHEL only
|
||||
|
||||
WALinuxAgent in RHEL8 uses platform-python, which is python3.6.
|
||||
'waagent.service', however, overrides this by calling
|
||||
'/usr/bin/python3' directly and in case this point to a newer
|
||||
AppStream Python (e.g. Python3.9) WALinuxAgent breaks as it can't
|
||||
find its files.
|
||||
|
||||
See also: https://github.com/Azure/WALinuxAgent/issues/2728
|
||||
See also: https://github.com/Azure/WALinuxAgent/pull/2729
|
||||
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
---
|
||||
init/redhat/waagent.service | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/init/redhat/waagent.service b/init/redhat/waagent.service
|
||||
index dc11fbb1..29056395 100644
|
||||
--- a/init/redhat/waagent.service
|
||||
+++ b/init/redhat/waagent.service
|
||||
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
-ExecStart=/usr/bin/python3 -u /usr/sbin/waagent -daemon
|
||||
+ExecStart=/usr/sbin/waagent -daemon
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Slice=azure.slice
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Microsoft Azure Linux Agent
|
||||
Name: WALinuxAgent
|
||||
Version: 2.7.0.6
|
||||
Release: 8%{?dist}
|
||||
Release: 6%{?dist}.alma
|
||||
|
||||
License: ASL 2.0
|
||||
Group: Development/Libraries
|
||||
@ -17,8 +17,9 @@ Patch0003: wla-redhat-Fix-command-sequence-for-restarting-net-inter.patch
|
||||
Patch4: wla-redhat-Use-NetworkManager-to-set-DHCP-hostnames-on-r.patch
|
||||
# For bz#2114824 - [Azure][WALA][RHEL-8.7] The description of "Logs.Collect" is incorrect
|
||||
Patch5: wla-Update-Log-Collector-default-in-Comments-and-Readme-.patch
|
||||
# For bz#2170104 - [Azure][WALA][RHEL-8] systemd service should not use python3
|
||||
Patch6: wla-Use-platform-python-in-waagent.service.patch
|
||||
|
||||
# AlmaLinux
|
||||
Patch1000: WALinuxAgent-2.3-almalinux_support.patch
|
||||
|
||||
# rhel requirements
|
||||
BuildRequires: python3-devel
|
||||
@ -56,7 +57,8 @@ Udev rules specific to Microsoft Azure Virtual Machines.
|
||||
%patch0003 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%patch1000 -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -96,17 +98,8 @@ rm -rf %{_unitdir}/waagent.service.d/
|
||||
%{_udevrulesdir}/*.rules
|
||||
|
||||
%changelog
|
||||
* Mon Mar 06 2023 Jon Maloy <jmaloy@redhat.com> - 2.7.0.6-8.el8_8
|
||||
- wla-redhat-Fix-frh.py-to-not-skip-valid-patches-to-init-.patch [bz#2170104]
|
||||
- wla-Use-platform-python-in-waagent.service.patch [bz#2170104]
|
||||
- Resolves: bz#2170104
|
||||
([Azure][WALA][RHEL-8] systemd service should not use python3)
|
||||
|
||||
* Mon Mar 06 2023 Jon Maloy <jmaloy@redhat.com> - 2.7.0.6-7.el8_8
|
||||
- wla-redhat-Fix-frh.py-to-not-skip-valid-patches-to-init-.patch [bz#2170104]
|
||||
- wla-Use-platform-python-in-waagent.service.patch [bz#2170104]
|
||||
- Resolves: bz#2170104
|
||||
([Azure][WALA][RHEL-8] systemd service should not use python3)
|
||||
* Tue Nov 08 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 2.7.0.6-6.alma
|
||||
- Add AlmaLinux support
|
||||
|
||||
* Mon Aug 29 2022 Miroslav Rezanina <mrezanin@redhat.com> - 2.7.0.6-6
|
||||
- wla-redhat-Remove-files-inside-WALA-services-directory.patch [bz#2114742]
|
||||
|
Loading…
Reference in New Issue
Block a user