1
0

25 Commits

Author SHA256 Message Date
8a8e0f880b Accepting request 1320490 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1320490
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=43
2025-11-28 15:54:13 +00:00
0d4707fcf2 - Fix dependencies for SLE 16 (bsc#1254129)
+ procps instead of sysvinit-tools

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=145
2025-11-21 13:52:06 +00:00
7a9baf44e7 no patch needed, but the subscription has to enable fips
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=144
2025-11-15 12:55:15 +00:00
057eff2e97 add gh patch reference
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=143
2025-11-14 22:03:18 +00:00
dacf8e4b9c - Update to version 2.14.0.1 (bsc#1253001)
+ Drop - included upstream
    ~ agent-btrfs-use-f.patch included upstream
    ~ remove-mock.patch
  + Add
    ~ paa_fips_compliance.patch
  + FIPS 140-3 support
  + Block extensions disallowed by policy
  + Report ext policy errors in heartbeat
  + Implement signature validation helper functions
  + Prevent ssh public key override
  + Use proper filesystem creation flag for btrfs
  + Enable resource monitoring in cgroup v2 machines
  + Update agent cgroup cleanup
  + Add cgroupv2 distros to supported list
  + Clean old agent cgroup setup
  + Redact sas tokens in telemetry events and agent log
  + Add conf option to use hardcoded wireserver ip instead of dhcp request
    to discover wireserver ip
  + Support for python 3.12
  + Update telemetry message for agent updates and send new telemetry for
    ext resource governance
  + Disable rsm downgrade
  + Add community support for Chainguard OS
  + Swap out legacycrypt for crypt-r for Python 3.13+
  + Pin setuptools version
  + Set the agent config file path for FreeBSD
  + Handle errors importing crypt module
- From 2.13.1.1
  + Setup: Fix install_requires list syntax

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=142
2025-11-14 15:50:58 +00:00
0974281672 Accepting request 1288018 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1288018
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=42
2025-06-24 18:47:46 +00:00
0cc8d30a6f - Set AutoUpdate.UpdateToLatestVersion=n in /etc/waagent.conf
(bsc#1244933)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=140
2025-06-23 18:29:01 +00:00
80584d051f Accepting request 1269989 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1269989
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=41
2025-04-16 18:42:30 +00:00
d040db9823 - Fix %suse_version conditional in spec file so package is built
using python2 in SLE 12 (bsc#1240385)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=138
2025-04-16 11:34:32 +00:00
5ce34bac0d Accepting request 1249088 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1249088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=40
2025-02-28 16:39:07 +00:00
88e4209600 Fix if statement
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=136
2025-02-20 21:25:58 +00:00
679dd59f5d - Add a new version of paa_force_py3_sle15.patch to compensate for
missing Python RPM macros in older distros

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=135
2025-02-20 21:18:02 +00:00
d0fde46790 Accepting request 1237584 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1237584
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=39
2025-01-14 15:22:43 +00:00
4a21e11fcd preserve unbiffered io nature
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=133
2025-01-06 21:55:01 +00:00
f316d385d9 - Update to version 2.12.04 (bsc#1235140)
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=132
2025-01-06 21:41:45 +00:00
9c11f2dd90 + Add paa_direct_exec_in_service.patch
~ The waagent script is executable and we set the proper interpreter
      using the macro for multibuild python. Do prefix the execution in the
      service file wit the interpreter

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=131
2025-01-06 21:36:27 +00:00
4d8c942d83 ~ Simplify build and install conditionals using macros
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=130
2025-01-06 17:19:03 +00:00
e8e4ee2b5e how about this
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=129
2025-01-06 16:49:34 +00:00
f9e05bb43e yet another try
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=128
2025-01-06 16:40:28 +00:00
3962c28761 another attempt to handle our insane variation in distribution naming
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=127
2025-01-06 16:25:46 +00:00
a9678fa135 - Stick with setup.py for all distro builds
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=126
2025-01-06 16:01:43 +00:00
c7ba1f90b8 create empty config file to appeas the checker
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=125
2025-01-06 15:10:01 +00:00
d4d53a7f55 - Update to version 2.12.04 (bsc#1234567890)
+ Remove agent-no-auto-update.patch handeled by config file specialization
    sub-packages
  + Remove paa_force_py3_sle15.patch handled by RPM macro
  + Remove agent-micro-is-sles.patch included upstream
  + Forward port paa_12_sp5_rdma_no_ext_driver.patch
  + Forward port remove-mock.patch
  + Fix install_requires list syntax
  + Update spec file
    ~ Remove conditions for distros no longer maintained
    ~ Switch to new Python version and wheel build for newer distros
From 2.12.02
  + Enable GA versioning #3082 #3184 #3189
  + Cgroups api refactor for v2 #3096 #3135 #3188 #3196
  + Fix JIT for FIPS 140-3 #3190
  + reset network service unit file if python version changes #3058
  + Recognize SLE-Micro as a SLE based distribution #3048
  + Add distutils/version.py to azurelinuxagent #3063
  + Use legacycrypt instead of crypt on Python >= 3.13 #3070
  + Fix osutil/default route_add to pass string array. #3072
  + Fix argument to GoalState.init #3073
  + Add lock around access to fast_track.json #3076
  + Add DistroVersion class to compare distro versions #3078
  + LogCollector should skip and log warning for files that don't exist #3098
  + check for unexpected process in agent cgroups before cgroups enabled #3103
  + [Redo with correct source/target]: Remove check for "ibXX" interface
    format and rework mac-address regex to expand support #3150
  + Fix Ubuntu version codename for 24.04 #3159
  + Update test certificate data #3166
  + move setupslice after cgroupsv2 check, remove unit file for

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=124
2024-12-26 10:48:34 +00:00
e4caa26f1d Accepting request 1226093 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1226093
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-azure-agent?expand=0&rev=38
2024-11-25 22:20:16 +00:00
adc11aaa68 - fix a few typos in the spec file and use proper macros where
applicable
- remove python3 requires

    installed.
  + Enabled support for Fast Track (faster processing of extensions)
- 2.8.0.11 followed 2.7.3.0, no intermediate releases
  in /etc and restoring them while an RPM update.
    interfaces of the VM

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=122
2024-11-24 12:53:12 +00:00
11 changed files with 310 additions and 305 deletions

BIN
WALinuxAgent-2.14.0.1.tar.gz LFS Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,11 +0,0 @@
--- azurelinuxagent/daemon/resourcedisk/default.py.orig
+++ azurelinuxagent/daemon/resourcedisk/default.py
@@ -124,7 +124,7 @@ class ResourceDiskHandler(object):
"{0}: {1}".format(device, ret[1]))
force_option = 'F'
- if self.fs == 'xfs':
+ if self.fs in ('btrfs', 'xfs'):
force_option = 'f'
mkfs_string = "mkfs.{0} -{2} {1}".format(
self.fs, partition, force_option)

View File

@@ -1,11 +0,0 @@
--- azurelinuxagent/common/osutil/factory.py.orig
+++ azurelinuxagent/common/osutil/factory.py
@@ -90,7 +90,7 @@ def _get_osutil(distro_name, distro_code
if distro_name in ("flatcar", "coreos") or distro_code_name in ("flatcar", "coreos"):
return CoreOSUtil()
- if distro_name in ("suse", "sle_hpc", "sles", "opensuse"):
+ if distro_name in ("suse", "sle-micro", "sle_hpc", "sles", "opensuse"):
if distro_full_name == 'SUSE Linux Enterprise Server' \
and Version(distro_version) < Version('12') \
or distro_full_name == 'openSUSE' and Version(distro_version) < Version('13.2'):

View File

@@ -1,11 +0,0 @@
--- config/suse/waagent.conf.orig
+++ config/suse/waagent.conf
@@ -109,7 +109,7 @@ OS.SshDir=/etc/ssh
# OS.CheckRdmaDriver=y
# Enable or disable goal state processing auto-update, default is enabled
-# AutoUpdate.Enabled=y
+AutoUpdate.Enabled=n
# Determine the update family, this should not be changed
# AutoUpdate.GAFamily=Prod

View File

@@ -1,16 +1,18 @@
--- azurelinuxagent/pa/rdma/suse.py.orig
+++ azurelinuxagent/pa/rdma/suse.py
Index: WALinuxAgent-2.12.0.4/azurelinuxagent/pa/rdma/suse.py
===================================================================
--- WALinuxAgent-2.12.0.4.orig/azurelinuxagent/pa/rdma/suse.py
+++ WALinuxAgent-2.12.0.4/azurelinuxagent/pa/rdma/suse.py
@@ -31,8 +31,17 @@ class SUSERDMAHandler(RDMAHandler):
def install_driver(self): # pylint: disable=R1710
"""Install the appropriate driver package for the RDMA firmware"""
+ suport_pci_passthrough = False
+ if Version(DISTRO_VERSION) == Version('12'):
+ if DistroVersion(DISTRO_VERSION) == DistroVersion('12'):
+ release_data = open('/etc/os-release').read()
+ if 'SP5' in release_data:
+ suport_pci_passthrough = True
+
if Version(DISTRO_VERSION) >= Version('15'):
if DistroVersion(DISTRO_VERSION) >= DistroVersion('15'):
- msg = 'SLE 15 and later only supports PCI pass through, no '
+ suport_pci_passthrough = True
+

View File

@@ -0,0 +1,12 @@
--- init/waagent.service.orig
+++ init/waagent.service
@@ -8,7 +8,8 @@ ConditionPathExists=/etc/waagent.conf
[Service]
Type=simple
-ExecStart=/usr/bin/python -u /usr/sbin/waagent -daemon
+Environment="PYTHONUNBUFFERED=true"
+ExecStart=/usr/sbin/waagent -daemon
Restart=always
RestartSec=5

View File

@@ -6,14 +6,3 @@
#
# Azure Linux Agent
#
--- init/waagent.service.orig
+++ init/waagent.service
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
[Service]
Type=simple
-ExecStart=/usr/bin/python -u /usr/sbin/waagent -daemon
+ExecStart=/usr/bin/python3 -u /usr/sbin/waagent -daemon
Restart=always
RestartSec=5

View File

@@ -1,3 +1,210 @@
-------------------------------------------------------------------
Fri Nov 21 13:49:16 UTC 2025 - Robert Schweikert <rjschwei@suse.com>
- Fix dependencies for SLE 16 (bsc#1254129)
+ procps instead of sysvinit-tools
-------------------------------------------------------------------
Thu Nov 13 13:17:58 UTC 2025 - Robert Schweikert <rjschwei@suse.com>
- Update to version 2.14.0.1 (bsc#1253001)
+ Drop - included upstream
~ agent-btrfs-use-f.patch included upstream
~ remove-mock.patch
+ FIPS 140-3 support
+ Block extensions disallowed by policy
+ Report ext policy errors in heartbeat
+ Implement signature validation helper functions
+ Prevent ssh public key override
+ Use proper filesystem creation flag for btrfs
+ Enable resource monitoring in cgroup v2 machines
+ Update agent cgroup cleanup
+ Add cgroupv2 distros to supported list
+ Clean old agent cgroup setup
+ Redact sas tokens in telemetry events and agent log
+ Add conf option to use hardcoded wireserver ip instead of dhcp request
to discover wireserver ip
+ Support for python 3.12
+ Update telemetry message for agent updates and send new telemetry for
ext resource governance
+ Disable rsm downgrade
+ Add community support for Chainguard OS
+ Swap out legacycrypt for crypt-r for Python 3.13+
+ Pin setuptools version
+ Set the agent config file path for FreeBSD
+ Handle errors importing crypt module
- From 2.13.1.1
+ Setup: Fix install_requires list syntax
+ Pickup latest goal state on tenant certificate rotation + Avoid
infinite loop when the tenant certificate is missing
+ Fix unsupported syntax in py2.6
+ Cgroup rewrite: uses systemctl for expressing desired configuration
instead drop-in files
+ Remove usages of tempfile.mktemp
+ Use random time for attempting new Agent update
+ Enable logcollector in v2 machines
+ Clean history files
+ Missing firewall rules reason
+ Add support for nftables (+ refactoring of firewall code)
+ Create walinuxagent nftable atomically
-------------------------------------------------------------------
Thu Jun 19 08:06:14 UTC 2025 - Joachim Gleissner <jgleissner@suse.com>
- Set AutoUpdate.UpdateToLatestVersion=n in /etc/waagent.conf
(bsc#1244933)
-------------------------------------------------------------------
Tue Apr 15 10:02:16 UTC 2025 - Joachim Gleissner <jgleissner@suse.com>
- Fix %suse_version conditional in spec file so package is built
using python2 in SLE 12 (bsc#1240385)
-------------------------------------------------------------------
Thu Feb 20 21:16:37 UTC 2025 - Robert Schweikert <rjschwei@suse.com>
- Add a new version of paa_force_py3_sle15.patch to compensate for
missing Python RPM macros in older distros
-------------------------------------------------------------------
Mon Dec 23 10:54:55 UTC 2024 - Robert Schweikert <rjschwei@suse.com>
- Update to version 2.12.04 (bsc#1235140)
+ Remove agent-no-auto-update.patch handeled by config file specialization
sub-packages
+ Remove paa_force_py3_sle15.patch handled by RPM macro
+ Remove agent-micro-is-sles.patch included upstream
+ Forward port paa_12_sp5_rdma_no_ext_driver.patch
+ Forward port remove-mock.patch
+ Add paa_direct_exec_in_service.patch
~ The waagent script is executable and we set the proper interpreter
using the macro for multibuild python. Do prefix the execution in the
service file wit the interpreter
+ Fix install_requires list syntax
+ Update spec file
~ Remove conditions for distros no longer maintained
~ Simplify build and install conditionals using macros
+ Enable GA versioning #3082 #3184 #3189
+ Cgroups api refactor for v2 #3096 #3135 #3188 #3196
+ Fix JIT for FIPS 140-3 #3190
+ reset network service unit file if python version changes #3058
+ Recognize SLE-Micro as a SLE based distribution #3048
+ Add distutils/version.py to azurelinuxagent #3063
+ Use legacycrypt instead of crypt on Python >= 3.13 #3070
+ Fix osutil/default route_add to pass string array. #3072
+ Fix argument to GoalState.init #3073
+ Add lock around access to fast_track.json #3076
+ Add DistroVersion class to compare distro versions #3078
+ LogCollector should skip and log warning for files that don't exist #3098
+ check for unexpected process in agent cgroups before cgroups enabled #3103
+ [Redo with correct source/target]: Remove check for "ibXX" interface
format and rework mac-address regex to expand support #3150
+ Fix Ubuntu version codename for 24.04 #3159
+ Update test certificate data #3166
+ move setupslice after cgroupsv2 check, remove unit file for
log collector and remove fiirewall daemon-reload #3223
+ Address pylint warning deprecated-method #3059
+ Run pylint on Python 3.11 #3067
+ Run unit tests with pytest on Python >= 3.10
+ Log logcollector cgroups if process is found in unexpected slice #3107
+ remove secret and use cert for aad app in e2e pipeline #3116
+ suppress pylint warn contextmanager-generator-missing-cleanup #3138
+ Switching to SNI based authentication for aad app #3137
+ updated PR template #3144
+ Avoiding mocked exception from being lost on test when using
python 3.12: complete mocked info #3149
+ Add more useful logging statement for agent unit properties #3154
+ Remove wireserver fallback for imds calls #3152
+ Remove unused import #3155
+ Add support for Azure Linux 3 #3183
+ Fix pytest warnings #3084
+ Allow use of node 16 #3160
+ Send controller/cgroup path telemetry #3231
From 2.13.0.2
+ #3221 Add support for nftables (+ refactoring of firewall code)
+ #3239 Create walinuxagent nftable atomically
+ Features in progress (Verify extension signature/Policy Enforcement)
+ #3200 Parse encodedSignature property from EGS
+ #3187 Add Regorus policy engine framework
+ #3222 Remove Regorus and platform check for policy enforcement
+ #3242 Telemetry (update logcollector telemetry with common properties)
+ #3208 Handle non-boolean when parsing extension manifests
+ #3211 Fix unicode type check when parsing extension manifests
+ #3133 Telemetry: high-priority events
+ #3240 Telemetry: report apparent dead code
+ #3210 Cleanup: remove AMA extension services cgroups tracking code
+ #3197 Accommodate the new behavior in OpenSSL 3.2.2 when given an
empty input
From 2.11.1.12
+ Remove multi config extension status only on extension delete #3172
From 2.111.1.4
+ General Improvements
+ Improvements in telemetry for firewall settings #3110, #3124
From 2.10.0.8
+ GA versioning #2810 #2850 #2860 #2881 #2974 #3004 #3015 #3033
+ Disabled GA versioning #2909 #2917 #3044
+ Add regular expression to match logs from very old agents #2839
+ Remove empty "distro" module #2854
+ Enable Python 2.7 for unit tests #2856
+ Add check for noexec on Permission denied errors #2859
+ Reorganize file structure of unit tests #2894
+ Report useful message when extension processing is disabled #2895
+ Add log and telemetry event for extension disabled #2897
+ Cleanup common directory #2902
+ Fix agent memory usage check #2903
+ enable rhel/centos agent-cgroups #2922
+ Add support for EC certificates #2936
+ Add Cpu Arch in local logs and telemetry events #2938
+ Clarify support status of installing from source. #2941
+ Gathering Guest ProxyAgent Log Files #2975
+ Remove debug info from waagent.status.json #2971
+ Handle errors when adding logs to the archive #2982
+ Update supported Ubuntu versions #2980
+ Fix pylint warning #2988
+ Add information about HTTP proxies #2985
+ update the proxy agenet log folder for logcollector #3028
+ Add config parameter to wait for cloud-init
(Extensions.WaitForCloudInit) #3031 [Added in 2.10.0.8]
+ Adding AutoUpdate.UpdateToLatestVersion new flag support #3020 #3027
[Added in 2.10.0.8]
+ Check certificates only if certificates are included in goal state #2803
+ Redact access tokens from extension's output #2811
+ Fix name of single IB device when provisioning RDMA #2814
+ Port NSBSD system to the latest version of waagent #2828
+ fix daemon version #2874
+ fix version checking in setup.py #2920
+ fix(ubuntu): Point to correct dhcp lease files #2979
+ Download certs on FT GS after check_certificates only when missing
from disk #2907
+ Add support for EC certificates (#2936) #2943 [Added in 2.10.0.5]
+ Fix for "local variable _COLLECT_NOEXEC_ERRORS referenced before
assignment" (#2935) #2944 [Added in 2.10.0.5]
+ Cache daemon version #2942 #2946 [Added in 2.10.0.5]
+ undo get daemon version change #2951 [Added in 2.10.0.5]
+ fix self-update frequency to spread over 24 hrs for regular type
and 4 hrs for hotfix #2948 [Added in 2.10.0.5]
+ ignore dependencies from extensions that do not have settings #2957
[Added in 2.10.0.6]
+ Do not reset the mode of a extension's log directory #3014
[Added in 2.10.0.8]
+ skip cgroup monitoring if log collector doesn't start by the agent.
#2939 [Added in 2.10.0.8]
+ NM should not be restarted during hostname publish if NM_CONTROLLED=y
#3008 [Added in 2.10.0.8]
+ Daemon should remove stale published_hostname file and log
useful warning #3016 [Added in 2.10.0.8]
+ Revert changes to publish_hostname in RedhatOSModernUtil #3032
[Added in 2.10.0.8]
+ Recover primary nic if down after publishing hostname in
RedhatOSUtil #3024 [Added in 2.10.0.8]
-------------------------------------------------------------------
Thu Oct 31 09:50:45 UTC 2024 - Dirk Müller <dmueller@suse.com>
- fix a few typos in the spec file and use proper macros where
applicable
- remove python3 requires
-------------------------------------------------------------------
Mon Aug 19 11:14:11 UTC 2024 - Robert Schweikert <rjschwei@suse.com>
@@ -49,7 +256,7 @@ Wed Apr 10 22:53:47 UTC 2024 - Robert Schweikert <rjschwei@suse.com>
would be removed. SInce we do not know which flavor of our images the
package is being upgraded on, preserve the previously existing config
file. This will orphan the file if non of the -config-* packages gets
installed.
installed.
-------------------------------------------------------------------
Tue Feb 20 20:07:51 UTC 2024 - Robert Schweikert <rjschwei@suse.com>
@@ -141,7 +348,7 @@ Thu Sep 29 20:40:07 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
Thu Sep 29 15:35:37 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
- Update to version 2.8.0.11 (bsc#1203164)
+ Enabled support for Fast Track (faster processing of extensions)
+ Enabled support for Fast Track (faster processing of extensions)
+ Add telemetry for VM Size
+ Add telemetry for environment variables passed to extensions
+ Enforce CPU quota on the Agent on Red Hat and CentOS 7.4+
@@ -161,13 +368,13 @@ Thu Sep 29 15:35:37 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
+ Add CentOS 7.9 to end-to-end-tests
+ Add Mariner to end-to-end-tests
- 2.8.0.11 followed 2.7.3.0, no intermediate releases
- 2.8.0.11 followed 2.7.3.0, no intermediate releases
-------------------------------------------------------------------
Thu Sep 1 08:03:21 UTC 2022 - Stefan Schubert <schubi@suse.com>
- Migration to /usr/etc: Saving user changed configuration files
in /etc and restoring them while an RPM update.
in /etc and restoring them while an RPM update.
-------------------------------------------------------------------
Thu Aug 11 16:55:04 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
@@ -257,7 +464,7 @@ Thu Aug 11 16:55:04 UTC 2022 - Robert Schweikert <rjschwei@suse.com>
+ Improved logging for Multi config (#2246)
- From 2.3.1.1
+ revert for reducing the time window where we restart the network
interfaces of the VM
interfaces of the VM
- From 2.3.0.2
+ Enforce CPUQuota on agent #2222, #2226
+ Add support for RequiredFeatures and GoalStateAggregateStatus APIs

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-azure-agent
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,34 +16,47 @@
#
%if 0%{?suse_version} >= 1600
%define pythons %{primary_python}
%else
%if 0%{?suse_version} == 1315
%define pythons python
%else
%define pythons python3
%endif
%endif
%global _sitelibdir %{%{pythons}_sitelib}
Name: python-azure-agent
Version: 2.14.0.1
Release: 0
Summary: Microsoft Azure Linux Agent
License: Apache-2.0
Group: System/Daemons
Version: 2.9.1.1
Release: 0
URL: https://github.com/Azure/WALinuxAgent
Source0: WALinuxAgent-%{version}.tar.gz
Patch1: agent-no-auto-update.patch
# Drop in 2034 when SLE 15 reaches EOL
Patch6: paa_force_py3_sle15.patch
Patch7: reset-dhcp-deprovision.patch
Patch8: paa_12_sp5_rdma_no_ext_driver.patch
# PATCH-FIX-UPSTREAM gh#Azure/WALinuxAgent#2741
Patch9: remove-mock.patch
Patch10: agent-micro-is-sles.patch
# PATCH-FIX-UPSTREAM gh#Azure/WALinuxAgent#3158
Patch11: agent-btrfs-use-f.patch
Patch12: paa_direct_exec_in_service.patch
BuildRequires: dos2unix
BuildRequires: %{pythons}-pip
BuildRequires: %{pythons}-setuptools
# azure-agent is maintained in SLE 12 codestream but wheel in 12-SP1 one
# disable this BuildRequires as work-around in 12 GA
%if 0%{?sle_version} >= 120100
BuildRequires: %{pythons}-wheel
%endif
BuildRequires: distribution-release
BuildRequires: openssl
BuildRequires: python-rpm-macros
%if 0%{?suse_version} > 1315
BuildRequires: python3-distro
BuildRequires: python3-setuptools
BuildRequires: %{pythons}-distro
%else
BuildRequires: python-setuptools
BuildRequires: python-xml
BuildRequires: %{pythons}-xml
%endif
BuildRequires: pkgconfig(udev)
Requires: eject
@@ -54,17 +67,17 @@ Requires: openssh
Requires: openssl
Requires: pwdutils
Requires: systemd
Requires: sysvinit-tools
%if 0%{?suse_version} && 0%{?suse_version} <= 1500
Requires: sysvinit-tools
Requires: wicked
%endif
%if 0%{?suse_version} && 0%{?suse_version} >= 1600
Requires: procps
%endif
Requires: %{pythons}-pyasn1
Requires: %{pythons}-xml
%if 0%{?suse_version} > 1315
Requires: python3-distro
Requires: python3-pyasn1
Requires: python3-xml
%else
Requires: python-pyasn1
Requires: python-xml
Requires: %{pythons}-distro
%endif
Requires: sudo
Requires: util-linux
@@ -87,13 +100,11 @@ Microsoft Azure Stack framework.
%package test
Summary: Unit tests
Group: Development/Languages/Python
Requires: %{name} == %{version}
Requires: %{name} = %{version}
Requires: %{pythons}-pytest
Requires: openssl
%if 0%{?suse_version} > 1315
Requires: python3-pytest
%else
Requires: python-mock
Requires: python-pytest
%if 0%{?suse_version} == 1315
Requires: %{pythons}-mock
%endif
%description test
@@ -102,9 +113,9 @@ Unit tests for python-azure-agent.
%package config-default
Summary: Default upstream configuration
Group: Development/Languages/Python
Requires: %{name} == %{version}
Provides: waagent-config
Requires: %{name} = %{version}
Conflicts: waagent-config
Provides: waagent-config
%description config-default
The default configuration for the agent as supplied by upstream for SUSE
@@ -112,9 +123,9 @@ The default configuration for the agent as supplied by upstream for SUSE
%package config-server
Summary: SUSE specific configuration for server products
Group: Development/Languages/Python
Requires: %{name} == %{version}
Provides: waagent-config
Requires: %{name} = %{version}
Conflicts: waagent-config
Provides: waagent-config
%description config-server
Modified waagent.conf file to meet SUSE policies and SUSE image build
@@ -123,9 +134,9 @@ setup
%package config-hpc
Summary: SUSE specific configuration for HPC
Group: Development/Languages/Python
Requires: %{name} == %{version}
Provides: waagent-config
Requires: %{name} = %{version}
Conflicts: waagent-config
Provides: waagent-config
%description config-hpc
Modified waagent.conf file to meet SUSE policies and SUSE image build
@@ -134,45 +145,44 @@ setup
%package config-micro
Summary: SUSE specific configuration for Micro
Group: Development/Languages/Python
Requires: %{name} == %{version}
Provides: waagent-config
Requires: %{name} = %{version}
Conflicts: waagent-config
Provides: waagent-config
%description config-micro
Modified waagent.conf file to meet SUSE policies and SUSE image build
setup
%prep
%setup -qn WALinuxAgent-%{version}
%patch -P 1
%if 0%{?suse_version} > 1315
%setup -q -n WALinuxAgent-%{version}
%if 0%{?suse_version} > 1315 && 0%{?suse_version} <= 1600
%patch -P 6
%endif
%patch -P 7
%patch -P 8
%patch -P 9 -p1
%patch -P 10
%patch -P 11
%patch -P 8 -p1
%patch -P 12
%build
%if 0%{?suse_version} > 1315
python3 setup.py build
%else
python setup.py build
%endif
# We have an insane veriation in the way we identify our distros from SUSE,
# sles, opensuse, openSUSE Tumbleweed and who knows what else. This makes it
# for all intend and purposes impractical to follow the bouncing ball and keep
# updating the upstream detection code. We use setup.py to be able to
# pass an argument during install
%python_build
%install
%python_exec setup.py install --prefix=%{_prefix} --lnx-distro='suse' --root=%{buildroot}
%if 0%{?suse_version} > 1315
python3 setup.py install --prefix=%{_prefix} --lnx-distro='suse' --root=%{buildroot}
rm %{buildroot}/usr/sbin/waagent2.0
%else
python setup.py install --prefix=%{_prefix} --lnx-distro='suse' --root=%{buildroot}
rm %{buildroot}%{_sbindir}/waagent2.0
%endif
%if 0%{?suse_version} >= 1600
%python3_fix_shebang
%endif
# Config file flavor setup
cp %{buildroot}%{_sysconfdir}/waagent.conf %{buildroot}%{_sysconfdir}/waagent.conf.default
# No autoupdate of binaries for any SUSE product
sed -i -e "s/# AutoUpdate.Enabled=y/AutoUpdate.Enabled=n/" %{buildroot}%{_sysconfdir}/waagent.conf
sed -i -e "s/# AutoUpdate.UpdateToLatestVersion=y/AutoUpdate.UpdateToLatestVersion=n/" %{buildroot}%{_sysconfdir}/waagent.conf
# Common settings for most SUSE products
# Generate all supported SSH host key types
sed -i -e "s/SshHostKeyPairType=rsa/SshHostKeyPairType=auto/" %{buildroot}%{_sysconfdir}/waagent.conf
@@ -209,13 +219,8 @@ mv %{buildroot}/lib/systemd/system/* %{buildroot}/%{_unitdir}
fi
### udev rules
%if 0%{?suse_version} < 1230
mkdir -p %{buildroot}/lib/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}/lib/udev/rules.d/
%else
mkdir -p %{buildroot}/usr/lib/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}/usr/lib/udev/rules.d/
%endif
mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d
mv %{buildroot}%{_sysconfdir}/udev/rules.d/* %{buildroot}%{_prefix}/lib/udev/rules.d/
### log file ghost
mkdir -p %{buildroot}/%{_localstatedir}/log
touch %{buildroot}/%{_localstatedir}/log/waagent.log
@@ -228,19 +233,15 @@ mv %{buildroot}/%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}/%{_sys
%endif
# install tests
%if 0%{?suse_version} > 1315
cp -r tests %{buildroot}/%{python3_sitelib}/azurelinuxagent
%else
cp -r tests %{buildroot}/%{python_sitelib}/azurelinuxagent
%endif
cp -r tests %{buildroot}/%{_sitelibdir}/azurelinuxagent
%pre
%service_add_pre waagent.service
# Handle the case when the -config-* package is not installed, we want to
# preserver the previousl config file that was flavor customized during
# image build
if [ -e /etc/waagent.conf ]; then
cp -Z /etc/waagent.conf /etc/waagent.conf.bak
if [ -e %{_sysconfdir}/waagent.conf ]; then
cp -Z %{_sysconfdir}/waagent.conf %{_sysconfdir}/waagent.conf.bak
fi
%if 0%{?suse_version} > 1500
@@ -253,16 +254,16 @@ done
%posttrans
# Do not clobber the config if it was installed from a config package, but
# put the oldfile back if we do not have another config file
if [ ! -e /etc/waagent.conf ]; then
if [ -e /etc/waagent.conf.bak ]; then
mv -Z /etc/waagent.conf.bak /etc/waagent.conf
if [ ! -e %{_sysconfdir}/waagent.conf ]; then
if [ -e %{_sysconfdir}/waagent.conf.bak ]; then
mv -Z %{_sysconfdir}/waagent.conf.bak %{_sysconfdir}/waagent.conf
#restart the waagent.service again the restert in post failed due
# to missing config
systemctl try-restart waagent.service
# Making the assumption that the rpmsave file was generated because of
# of the previously broken package upgrade.
elif [ -e /etc/waagent.conf.rpmsave ]; then
cp -Z /etc/waagent.conf.rpmsave /etc/waagent.conf
elif [ -e %{_sysconfdir}/waagent.conf.rpmsave ]; then
cp -Z %{_sysconfdir}/waagent.conf.rpmsave %{_sysconfdir}/waagent.conf
#restart the waagent.service again the restert in post failed due
# to missing config
systemctl try-restart waagent.service
@@ -315,31 +316,18 @@ ln -s %{_sysconfdir}/waagent.conf.micro %{_sysconfdir}/waagent.conf
%endif
%ghost %{_localstatedir}/log/waagent.log
%{_unitdir}/waagent.service
%if 0%{?suse_version} < 1230
/lib/udev/rules.d/66-azure-storage.rules
/lib/udev/rules.d/99-azure-product-uuid.rules
%else
/usr/lib/udev/rules.d/66-azure-storage.rules
/usr/lib/udev/rules.d/99-azure-product-uuid.rules
%endif
%if 0%{?suse_version} > 1315
%dir %{python3_sitelib}/azurelinuxagent
%{python3_sitelib}
%exclude %{python3_sitelib}/azurelinuxagent/tests
%else
%dir %{python_sitelib}/azurelinuxagent
%{_prefix}/lib/udev/rules.d/66-azure-storage.rules
%{_prefix}/lib/udev/rules.d/99-azure-product-uuid.rules
%dir %{_sitelibdir}/azurelinuxagent
%{_sitelibdir}
%exclude %{_sitelibdir}/azurelinuxagent/tests
%if 0%{?suse_version} <= 1315
%attr(0755,root,root) %{_sbindir}/waagent2.0
%{python_sitelib}
%exclude %{python_sitelib}/azurelinuxagent/tests
%endif
%files test
%defattr(0644,root,root,0755)
%if 0%{?suse_version} > 1315
%{python3_sitelib}/azurelinuxagent/tests
%else
%{python_sitelib}/azurelinuxagent/tests
%endif
%{_sitelibdir}/azurelinuxagent/tests
%files config-default
%ghost %{_sysconfdir}/waagent.conf

View File

@@ -1,160 +0,0 @@
Index: WALinuxAgent-2.9.1.1/tests/common/dhcp/test_dhcp.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/common/dhcp/test_dhcp.py
+++ WALinuxAgent-2.9.1.1/tests/common/dhcp/test_dhcp.py
@@ -15,7 +15,10 @@
# Requires Python 2.6+ and Openssl 1.0+
#
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import azurelinuxagent.common.dhcp as dhcp
import azurelinuxagent.common.osutil.default as osutil
from tests.tools import AgentTestCase, open_patch, patch
Index: WALinuxAgent-2.9.1.1/tests/common/osutil/test_default.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/common/osutil/test_default.py
+++ WALinuxAgent-2.9.1.1/tests/common/osutil/test_default.py
@@ -22,7 +22,10 @@ import subprocess
import tempfile
import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import azurelinuxagent.common.conf as conf
import azurelinuxagent.common.osutil.default as osutil
Index: WALinuxAgent-2.9.1.1/tests/common/test_event.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/common/test_event.py
+++ WALinuxAgent-2.9.1.1/tests/common/test_event.py
@@ -26,7 +26,10 @@ import threading
import xml.dom
from datetime import datetime, timedelta
-from mock import MagicMock
+try:
+ from unittest.mock import MagicMock
+except ImportError:
+ from mock import MagicMock
from azurelinuxagent.common.utils import textutil, fileutil
from azurelinuxagent.common import event, logger
Index: WALinuxAgent-2.9.1.1/tests/common/test_version.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/common/test_version.py
+++ WALinuxAgent-2.9.1.1/tests/common/test_version.py
@@ -20,7 +20,10 @@ from __future__ import print_function
import os
import textwrap
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import azurelinuxagent.common.conf as conf
from azurelinuxagent.common.future import ustr
Index: WALinuxAgent-2.9.1.1/tests/distro/test_scvmm.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/distro/test_scvmm.py
+++ WALinuxAgent-2.9.1.1/tests/distro/test_scvmm.py
@@ -20,7 +20,10 @@
import os
import unittest
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
import azurelinuxagent.daemon.scvmm as scvmm
from azurelinuxagent.common import conf
Index: WALinuxAgent-2.9.1.1/tests/ga/mocks.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/ga/mocks.py
+++ WALinuxAgent-2.9.1.1/tests/ga/mocks.py
@@ -17,7 +17,10 @@
import contextlib
-from mock import PropertyMock
+try:
+ from unittest.mock import PropertyMock
+except ImportError:
+ from mock import PropertyMock
from azurelinuxagent.ga.exthandlers import ExtHandlersHandler
from azurelinuxagent.ga.remoteaccess import RemoteAccessHandler
from azurelinuxagent.ga.update import UpdateHandler, get_update_handler
Index: WALinuxAgent-2.9.1.1/tests/ga/test_collect_telemetry_events.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_collect_telemetry_events.py
+++ WALinuxAgent-2.9.1.1/tests/ga/test_collect_telemetry_events.py
@@ -26,7 +26,10 @@ import string
import uuid
from collections import defaultdict
-from mock import patch, MagicMock
+try:
+ from unittest.mock import patch, MagicMock
+except ImportError:
+ from mock import patch, MagicMock
from azurelinuxagent.common import conf
from azurelinuxagent.common.event import EVENTS_DIRECTORY
Index: WALinuxAgent-2.9.1.1/tests/ga/test_remoteaccess_handler.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_remoteaccess_handler.py
+++ WALinuxAgent-2.9.1.1/tests/ga/test_remoteaccess_handler.py
@@ -16,7 +16,10 @@
#
from datetime import timedelta, datetime
-from mock import Mock, MagicMock
+try:
+ from unittest.mock import Mock, MagicMock
+except ImportError:
+ from mock import Mock, MagicMock
from azurelinuxagent.common.osutil.default import DefaultOSUtil
from azurelinuxagent.common.protocol.goal_state import RemoteAccess
from azurelinuxagent.common.protocol.util import ProtocolUtil
Index: WALinuxAgent-2.9.1.1/tests/ga/test_send_telemetry_events.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/ga/test_send_telemetry_events.py
+++ WALinuxAgent-2.9.1.1/tests/ga/test_send_telemetry_events.py
@@ -24,7 +24,10 @@ import time
import uuid
from datetime import datetime, timedelta
-from mock import MagicMock, Mock, patch, PropertyMock
+try:
+ from unittest.mock import MagicMock, Mock, patch, PropertyMock
+except ImportError:
+ from mock import MagicMock, Mock, patch, PropertyMock
from azurelinuxagent.common import logger
from azurelinuxagent.common.datacontract import get_properties
Index: WALinuxAgent-2.9.1.1/tests/utils/test_network_util.py
===================================================================
--- WALinuxAgent-2.9.1.1.orig/tests/utils/test_network_util.py
+++ WALinuxAgent-2.9.1.1/tests/utils/test_network_util.py
@@ -16,7 +16,10 @@
#
import subprocess
-from mock.mock import patch
+try:
+ from unittest.mock import patch
+except ImportError:
+ from mock import patch
import azurelinuxagent.common.utils.networkutil as networkutil
from tests.tools import AgentTestCase