commit 63c0bfff3c909ebfdf18cec793a1c8514e7715856503a085508ff55e0e8d5935 Author: Adrian Schröter Date: Fri May 3 20:11:35 2024 +0200 Sync from SUSE:SLFO:Main python-azure-agent revision 904ec033535a3389003db3ad41b69ed0 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/WALinuxAgent-2.9.1.1.tar.gz b/WALinuxAgent-2.9.1.1.tar.gz new file mode 100644 index 0000000..ef4725f --- /dev/null +++ b/WALinuxAgent-2.9.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8c92d828939d47652f58c634d54f52e1c7bd619576f073908c37e62d6f8e5eb +size 1986486 diff --git a/agent-micro-is-sles.patch b/agent-micro-is-sles.patch new file mode 100644 index 0000000..a0f0d50 --- /dev/null +++ b/agent-micro-is-sles.patch @@ -0,0 +1,11 @@ +--- 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'): diff --git a/agent-no-auto-update.patch b/agent-no-auto-update.patch new file mode 100644 index 0000000..70aad03 --- /dev/null +++ b/agent-no-auto-update.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/paa_12_sp5_rdma_no_ext_driver.patch b/paa_12_sp5_rdma_no_ext_driver.patch new file mode 100644 index 0000000..bb1bdd9 --- /dev/null +++ b/paa_12_sp5_rdma_no_ext_driver.patch @@ -0,0 +1,21 @@ +--- azurelinuxagent/pa/rdma/suse.py.orig ++++ 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'): ++ release_data = open('/etc/os-release').read() ++ if 'SP5' in release_data: ++ suport_pci_passthrough = True ++ + if Version(DISTRO_VERSION) >= Version('15'): +- msg = 'SLE 15 and later only supports PCI pass through, no ' ++ suport_pci_passthrough = True ++ ++ if suport_pci_passthrough: ++ msg = 'SLE 12 SP5 and later only supports PCI pass through, no ' + msg += 'special driver needed for IB interface' + logger.info(msg) + return True diff --git a/paa_force_py3_sle15.patch b/paa_force_py3_sle15.patch new file mode 100644 index 0000000..274fbf0 --- /dev/null +++ b/paa_force_py3_sle15.patch @@ -0,0 +1,19 @@ +--- bin/waagent.orig ++++ bin/waagent +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # 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 + diff --git a/python-azure-agent.changes b/python-azure-agent.changes new file mode 100644 index 0000000..7d2bdcc --- /dev/null +++ b/python-azure-agent.changes @@ -0,0 +1,1060 @@ +------------------------------------------------------------------- +Tue Feb 20 20:07:51 UTC 2024 - Robert Schweikert + +- Do not force wicked dependency for networking, allow NM in SLE Micro 5.5 + and for ALP based products +- Change patch syntax in preparetion for RPM 4.20 + +------------------------------------------------------------------- +Mon Feb 12 18:46:08 UTC 2024 - Robert Schweikert + +- Recognise SLE-Micro as a SLE based distro + + Add agent-micro-is-sles.patch + +------------------------------------------------------------------- +Mon Nov 13 17:46:41 UTC 2023 - Robert Schweikert + + +- Create sub-packages for the config (jsc#PED-7869) + + Remove config manipulation from image building + + Set up a config for SLE-Micro + + Makes deafult upstream config available + +- Update to 2.9.1.1 (bsc#1217301, bsc#1217302) + + Update remove-mock.patch + + Download certificates when goal state source is fast track #2761 + + Increase the max number of extension events by 20% #2785 + + Remove version suffix from extension slice #2782 + + Support int type for eventPid and eventTid fields #2786 + + Improve log for swap counter not found #2789 + + Remove cgroup files during deprovisioning #2790 + + Log VM architecture in heartbeat telemetry for arm64 adoption + monitoring #2818 + + Enforce memory usage for agent #2671 + + Use common download logic for agent downloads #2682 + + Implement Fedora distro #2642 + + Report message in handler heartbeat #2688 + + Remove dependency on pathlib from makepkg #2717 + + Do not fetch extensions goal state in log collector #2713 + + Update log collector unit file to remove memory limit #2757 + + Fix bug in get_dhcp_pid (CoreOS) #2784 + + Fetch full distro version for mariner #2773 +From 2.9.04 + + Resource Governance on extensions (CPU monitoring and enforcing & Memory + monitoring) #2632 #2581 #2555 + + Agent resource governance #2597 #2591 #2546 + + monitor system-wide memory metrics (#2610) + + Additional telemetry for goal state (#2675) + + HostGAPlugin usage improvements #2662 #2673 #2655 #2651 + + Add logging statements for mrseq migration during update (#2667) + + Logcollector memory usage #2658 #2637 + + Update Log Collector default in Comments and Readme (#2608) + + Improve telemetry success and failure markers (#2605) #2604 #2599 + + Fix formatting of exceptions on Python 3.10 + (traceback.format's etype argument) (#2663) + + Fix UNKNOWN(Zombie) Process in unexpected processes check (#2644) + + SUSE: Fix valid values for DHCLIENT_HOSTNAME_OPTION (#2643) + + Debian - string conversion for systemd service (#2574) + + Do not set a CPU quota on the agent for RHEL and Centos (#2685) #2689 #2693 + + support rhel distro (#2620) #2598 + + Added support for devuan linux distribution (#2553) + +No incremental updates between 2.8.011 and 2.9.0.4 + +------------------------------------------------------------------- +Thu Feb 9 11:37:51 UTC 2023 - Dominique Leuenberger + +- Clean up conditions in spec file: + + There is no maintained distro > 1315 (SLE12) AND < 1500 + (SLE15). Only openSUSE 13.2 and 13.3 lived in that space, but + they are clearly not the target of this spec file. + + if 0%{?Suse_version} && 0{?suse_version} > 1315: no need to + first validate suse_version being defined: whenever it + is > 1315, must be defined. + +------------------------------------------------------------------- +Wed Jan 25 04:34:04 UTC 2023 - Steve Kowalik + +- Add patch remove-mock.patch: + * Use unittest.mock first, falling back to mock if required. +- Tighten Requires against python3-mock. + +------------------------------------------------------------------- +Thu Sep 29 20:40:07 UTC 2022 - Robert Schweikert + +- Add paa_12_sp5_rdma_no_ext_driver.patch (bsc#1203181) + +------------------------------------------------------------------- +Thu Sep 29 15:35:37 UTC 2022 - Robert Schweikert + +- Update to version 2.8.0.11 (bsc#1203164) + + 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+ + + Restore all firewall rules needed for communication with the WireServer + + Fix false positives reporting processes in the Agent's cgroup + + Fix false errors when collecting debug logs + + Don't report incorrect CPU usage data + + Fetching a goal state with empty certificates property + + Silence goal state fetch errors after 3 logs + + Change fast track timestamp default from None to datetime.min + + Retry HGAP's extensionsArtifact requests on BAD_REQUEST status + + Support for Rocky Linux + + RHEL 8 + + RHEL 9 + + Preliminary work to enforce CPU quota on extensions + + Preliminary work for management of agent self-updates [GA Versioning] + + 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 + +------------------------------------------------------------------- +Thu Sep 1 08:03:21 UTC 2022 - Stefan Schubert + +- Migration to /usr/etc: Saving user changed configuration files + in /etc and restoring them while an RPM update. + +------------------------------------------------------------------- +Thu Aug 11 16:55:04 UTC 2022 - Robert Schweikert + +- Update to 2.7.3.0 (jsc#PED-1298) + + Remove proper_dhcp_config_set.patch included upstream + + Remove sle_hpc-is-sles.patch included upstream + + Forward port reset-dhcp-deprovision.patch + + Retry HGAP's extensionsArtifact requests on BAD_REQUEST status #2622 + + Use 'ip' instead of 'ifdown/ifup' to restart network interface on + RHEL >= 8.6 #2612 #2624 +- From 2.7.1.0 + + hotfix for OOM errors on the log collector +- From 2.7.0.6 + + Increase time of autoupdates after updates are available #2403 + + Send telemetry when upgrade available #2421 + + Enable collection of debugging information #2436, #2453, #2510 + + Add support for Python 2.6 to the debug info collection code #2452 + + Enable CPU/memory data collection on RedHat and CentOS #2450 + + Exclude end-to-end tests from Agent setup #2396, #2402 + + Fix log message in cgroups management #2427 + + Fix parsing of malformed error.json files #2433 + + Allow DNS queries over TCP #2429 + + Dont exit extension handler process if unable to fetch + first goal state #2440 + + Improvements for Mariner #2407, #2414 + + Add uos support #2420 + + Add support for VMware PhotonOS #2431 +- From 2.6.0.2 + + added cloudlinux support (#2344) + + Enable extensions cpu monitoring (#2357, #2384, #2391) + + Support Flatcar Container Linux (#2365) + + Retrieve VmSettings from HostGAPlugin + (#2378, #2382, #2386, #2394, #2397, #2404) + + Set Agent's CpuQuota to 75% (#2383) + + Use handler status if extension status is None when computing + the ExtensionsSummary (#2358) (#2361) + + fix bug with dependent extensions with no settings (#2285) (#2362) + + Create events dir for handlers if ETP enabled (#2366) + + Report status even if goal state cannot be processed (#2370) + + Define ExtensionsSummary.eq (#2371) (#2373) + + Implement ExtensionsSummary.ne in terms of eq (#2375) +- From 2.5.0.2 + + Enable Extension Telemetry Pipeline (#2337, #2339) + + Enable Periodic Log Collection in systemd distros (#2295,#2289) + + Implement InitialGoalStatePeriod parameter + improvements in logging + goal state processing(#2332) + + Fix operation name in InitializeHostPlugin event(#2338) + + Mock systemctl stop cmd (#2335) + + Report transitioning when status file not found (#2330) + + Dont create default status file for Single-Config extensions (#2318) + + Do not create placeholder status file for AKS extensions (#2298) + + Save waagent_status to history folder and add additional details to + the status file (#2325,#2301,#2270) + + Rename Debug.FetchVmSettings to Debug.EnableFastTrack (#2324) + + Update HostGAplugin headers before fetching vmSettings (#2323) + + Handle HTTP GONE in vmSettings request (#2321) + + Added log statements to debug issues in vmSettings API(#2317) + + Remove reference to re.IGNORECASE (#2316) + + Add and remove extension slice (#2315) + + FastTrack changes (#2314, #2313,#2306, #2304,#2294, #2293) + + Helper to handle exception message(#2305) + + Remove trailing spaces from command name (#2296) + + Add debug info for systemd-run false positives (#2292) + + Move Github Actions VMs to Ubuntu 18 (#2291) + + Onboard redhat82, ubuntu20 (#2290, #2279) + + Allow systemd-run in the Agent's cgroup (#2287) + + Use handler status if extension status is None (#2358) + + Bug Fix :Define ExtensionsSummary.ne (#2371) +- From 2.4.0.2 + + Support for Multi config (#2245, #2261) + + Support sles 15 sp2 distro (#2272) + + Cleanup history folder every 30 min (#2258) + + Updated _read_status_file to include a fragment of status file in + the exception (#2257) + + Fix telemetry unicode errors (Re-add #1937) (#2278) + + Match IPoIB interface with any alphanumeric characters (#2239) + + Fix bug with dependent extensions with no settings (#2285) + + Do not create placeholder status file for AKS extensions (#2298) + + Refactoring of Agent's main loop (#2275) + + Exception for Linux Patch Extension for creating placeholder + status file (#2307) + + Dont create default status file for Single-Config extensions (#2318) + + Fix bad logging (#2241) + + Fixed logging of PeriodicOperation (#2263) + + Log collector broken pipe fix (#2267) + + 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 +- From 2.3.0.2 + + Enforce CPUQuota on agent #2222, #2226 + + Add support for RequiredFeatures and GoalStateAggregateStatus APIs + #2190, #2206, #2209, #2216 + + Added fallback locations for extension manifests #2188 + + Add missing call to str.format() when creating exception #2193 + + Remove helper network service on deprovision #2191 + + Use a helper script to start the network service #2225 #2253 + + Initialize published_hostname using /var/lib/cloud/data/set-hostname #2215 + + Fix utf logging for persist firewall rules #2237 + + Replace firewall-setup unit file if changed #2236 +- From 2.2.54 + + PA changes to check cloud-init (#2061) + + log collector (#2066) + + cgroups CPU percentage py processor count (#2074) + + Parse InVMGoalStateMetaData from Extension Config (#2081) + + iscsi disk support for agent configs (#2073) + + Add support for VMs with multiple IB devices (#2085) + + Python 3.9 support (#2082) + + Add support for CBL-Mariner distro (#2099) + + Enable Provisioning.MonitorHostName for Ubuntu (#1934) + + Added supportedFeatures flag in status reporting (#2089) + + Parse ext runtime settings (#2087) + + GHA merge validation (#2097) + + Cgroups improvements + + renamed the eventsFolder variable for preview and enabled ETP (#2140) + + Agent slice and custom unit files telemetry (#2150) + + Make IPoIB interface online (#2116) + + Add option to disable NetworkConfigurationChanges (#2156) + + Log network configuration on service start (#2157) + + Setup persistent firewall rules on service restart (#2154) + + switched to using run_command (#2060) + + fixes for chained-comparison and dangerous-default-value pylint + warnings (#2072) + + fixed depends on errors (#2059) + + WireIp env variable added (#2078) + + Unstick HGAP channel as default (#2046) + + shellutil.run_command fixes (#2086, #2098) + + unit test fixes (#2090, #2091, #2108, #2153) + + fix distro resolution for RedHat (#2083) + + Read KVP value in binary mode (#2084) + + Redact protected settings in goal state debug files (#2130) + + Modify retry logic for empty goal state (#2140) + + GS no config fix (#2141) + + CommandExecution.log logrototate config -> custom log management (#2143) + + binary file for firewall rules (#2147) + + Refresh host ga plugin periodically (#2155) + + Disabled custom service (#2166) + + update test zips (#2167) +- From 2.2.53.1 + + Extension Telemetry Pipeline as a private-preview feature +- From 2.2.53 + + Start exthandler with the same python interpreter (#2007) + + Verify that the extension status is an array (#2010) + + Remove enum _UpdateType and retry fetching goal state (#2018) + + use dd for ext4 as well as xfs (#2042) + + Fix path for error.json (#2044) + + Switch to run command changes, + provisioning changes that need to be + reverted. (#2050) + + Fix timestamp for goal state archive (#2051) + + Case insensitive parsing or Plugins and PluginSettings (#2054) + + Revert "Fixed delays for HTTP retries rather than exponential + delays (#1967)" (#2065) + + Fixed bug causing "MAC verified OK" message (#2069) + + Revert unicode fix manually (#1937) (#2070) + + Recreate handler environment file on service startup (#1960) + + Add log collection tool and thread (#1987) + + Thread interface (#1990) + + Verify that the CPU and Memory cgroups for the agent are properly + initialized; disabled cgroups if they are not active. (#2015) + + SUSE config: use Btrfs LZO compression for ResourceDisk (#2055) + + Extension telemetry pipeline (#1918) + + Reformatted the heartbeat event (#2009) + + Add LIS version to OSInfo.message (#2011) + + One thread for telemetry (#2019) + + Limit description character length sent for health report (#2020) + + Remove Serial Console Logging (#2028) + + Echo log to /dev/console during provisioning (#2043) + + Adding telemetry for logrotate (#2045) + + Report placeholder extension status as an array (#2068) + + Fix broken link in readme (#2014) + + Add log collector flags to README (#2029) +- From 2.2.52 + + Do not retrieve users in each goal state (#1935) + + Fix check for systemd-run failure when invoking extensions (#1943) + + Fix telemetry unicode errors (#1937) + + Uninstall unregistered extensions (#1970) + + Use run_command to execute iptables (#1944) + + Use run_command for ip route (#1958) + + Fix handling of gen2 disks with udev rules (#1954) + + Add API for uploading logs via host plugin (#1902) + + Fixed delays for HTTP retries rather than exponential delays (#1967) + + Resolve undefined variable (#1950) + + Convert owner uid to string (#1949) + + Fix Travis special checks for distro and remove useless cgroup tests (#1959) + + Use tmp_dir instead of data_dir (#1968) + + +------------------------------------------------------------------- +Tue Jun 21 11:12:12 UTC 2022 - Stefan Schubert + +- Removed %config flag for files in /usr directory. + +------------------------------------------------------------------- +Mon Jun 20 10:31:02 UTC 2022 - Stefan Schubert + +- Cleanup spec file: + -- Removed %{_distconfdir}/logrotate.d from dirlist. It will be + handled by package filelist now. + -- %{_distconfdir}/logrotate.d/* can be changed by vendor only. + So it will be replaced by an RPM update. + +------------------------------------------------------------------- +Wed Jun 15 10:57:00 UTC 2022 - Stefan Schubert + +- Moved logrotate files from user specific directory /etc/logrotate.d + to vendor specific directory /usr/etc/logrotate.d. + +------------------------------------------------------------------- +Tue May 17 15:11:53 UTC 2022 - pgajdos@suse.com + +- require python-rpm-macros to fix build for TW +- do not require test dependencies for build, they are not needed + (no testsuite run in %check) + +------------------------------------------------------------------- +Thu May 5 12:13:47 UTC 2022 - Robert Schweikert + +- Add reset-dhcp-deprovision.patch (bsc#1198258) + + Reset the dhcp config when deprovisioning and instance to ensure + instances from aVM image created from that instance send host information + to the DHCP server. + +------------------------------------------------------------------- +Sat Jan 30 11:25:56 UTC 2021 - Robert Schweikert + +- Add sysvinit-tools as dependency (bsc#1181600, bsc#1181601) + +------------------------------------------------------------------- +Tue Jan 12 21:20:17 UTC 2021 - Robert Schweikert + +- Add sle_hpc-is-sles.patch (bsc#1180719) + + Recognise SLE_HPC as SLES and use the proper RDMA handler and + distro specific initialization code + +------------------------------------------------------------------- +Sat Oct 3 15:33:42 UTC 2020 - Robert Schweikert + +- Update proper_dhcp_config_set.patch (bsc#1177161, bsc#1177257) + + Add missing imports + +------------------------------------------------------------------- +Thu Sep 10 13:02:13 UTC 2020 - Robert Schweikert + +- Update to version 2.2.49.2 (bsc#1176368, bsc#1176369) + + Remove paa_use_hostnamectl.patch included upstream + + Forwrad port proper_dhcp_config_set.patch + + Do not use --unit with systemd-cgls (#1910) + + Report processes that do not belong to the agent's cgroup (#1908) + + Use controller mount point for extension cgroup path (#1899) + + Improvements in setup of cgroups (#1896) + + Remove ExtensionsMetricsData and per-process Memory data (#1884) + + Fix return value of start_extension_command (#1927) + + Remove import * (#1900) + + Fix flaky ExtensionCleanupTest class (#1898) + + Fix codecov badge (#1883) + + Changed codecov to run on py3.8 (#1875) + + Update documentation on /dev/random (#1909) + + Mount options are in mount(8) (#1893) + + Remove ssh host key thumbprint in report ready (#1913) + + Emit AutoUpdate value at service start only (#1907) + + Add logging for version mismatch (#1895) + + Send telemetry event if libdir changes (#1897) + + Add log collector utility (#1847) + + Move AutoUpdate reporting to HeartBeat event (#1919) + + Removing infinite download of extension manifest without a new GS (#1874) + + Fix wrongful dir deletion (#1873) + + Fix the cleanup-outdated-handlers to only delete handlers that are not + present in the GS (#1889) + + Expose periods of environment thread in waagent.conf (#1891) + + Added user @kevinclark19a as Contributor. (#1906) + +- From 2.2.48.1 + + Refactoring GoalState class out of Protocol, making Protocol thread-safe, + removing stale dependencies of Protocol and removing the dependency on + the file system to read the Protocol info + + Fetch goal state when creating HostPluginProtocol (#1799) + + Separate goal state from the protocol class (#1777) + + Make protocol util a singleton per thread (#1743, #1756) + + Fetch goal state before sending telemetry (#1751) + + Remove file dependency (#1754) + + Others (#1758, #1767, #1744, #1749, #1816, #1820) + + New logs for goal state fetch (#1797) and refresh (#1794). + + Thread name added to logs (#1778) + + Populate telemetry events at creation time (#1791) + + Periodic HeartBeat to be logged to the file (#1755) + + Add unit test to verify call stacks on telemetry events (#1828) + + Others (#1841, #1842, #1846) + + Handling errors while reading extension status files + (Limiting Size and Transient issues)(#1761) + + Enable SWAP on Resource Disk as Application Certification Support + suggested (#1762) + + Update 'Provisioning' options in default configs ( #1853) + + Drop Metadata Server Support (#1806, #1839, #1840 ) + + Improve documentation of ResourceDisk.EnableSwapEncryption (#1782) + + Removed is_snappy function (#1774) + + Handle exceptions in monitor thread (#1770) + + Fix timestamp for periodic operations in the monitor thread (#1879) + + Fix permissions on the Ubuntu systemd service file (#1814) + + Update hostname setting for SUSE distros (#1832) + + Python 3.8 improvements + support for Ubuntu 20.04 (#1860, #1865, #1738) + + Testing and dev-infra improvements + [#1771, #1768, #1800, #1826, #1827, #1833] + + Others (#1854, #1858) + +- From 2.2.46 + + [#1741] Do not update goal state when refreshing the host plugin + + [#1731] Fix upgrade sequence when update command fails + + [#1725] Initialize CPU usage + + [#1716, #1737] Added UTC logging and correcting the format + + [#1651, #1729] Start sending PerformanceCounter metrics and + additional memory information for Cgroups + +------------------------------------------------------------------- +Fri Aug 14 12:59:45 UTC 2020 - Robert Schweikert + +- Drop paa_sudo_sle15_nopwd.patch (bsc#1175198) + + sudoers file is managed by cloud-init we no longer need this hack + +------------------------------------------------------------------- +Fri Jul 17 17:20:01 UTC 2020 - Robert Schweikert + +- Add proper_dhcp_config_set.patch (bsc#1173866) + + Properly set the dhcp configuration to push the hostname to the DHCP + server + + Do not bring the interface down to push the hostname, just use ifup + +------------------------------------------------------------------- +Tue Mar 24 20:41:35 UTC 2020 - Robert Schweikert + +- Add paa_use_hostnamectl.patch (bsc#1167601, bsc#1167602) + + Set the hostname using hostnamectl to ensure setting is + properly applied + +------------------------------------------------------------------- +Mon Feb 3 15:53:16 UTC 2020 - Dominique Leuenberger + +- BuildRequire pkgconfig(udev) instead of udev: allow OBS to + shortcut through -mini flavors. + +------------------------------------------------------------------- +Thu Dec 5 21:10:48 UTC 2019 - Robert Schweikert + +- Update to version 2.2.45 (jsc#ECO-80) + + Remove paa_cve_2019-0804.patch, included upstream + + Add support for Gen2 VM resource disks + + Use alternate systemd detection + + Fix /proc/net/route requirement that causes errors on FreeBSD + + Add cloud-init auto-detect to prevent multiple provisioning mechanisms + from relying on configuration for coordination + + Disable cgroups when daemon is setup incorrectly + + Remove upgrade extension loop for the same goal state + + Add container id for extension telemetry events + + Be more exact when detecting IMDS service health + + Changing add_event to start sending missing fields +- From 2.2.44 + + Remove outdated extension ZIP packages + + Improved error handling when starting extensions using systemd + + Reduce provisioning time of some custom images + + Improve the handling of extension download errors + + New API for extension authors to handle errors during extension update + + Fix handling of errors in calls to openssl + + Improve logic to determine current distro + + Reduce verbosity of several logging statements +- From 2.2.42 + + Poll for artifact blob, addresses goal state procesing issue +- From 2.2.41 + + Rewriting the mechanism to start the extension using systemd-run for + systems using systemd for managing + + Refactoring of resource monitoring framework using cgroup for both + systemd and non-systemd approaches [#1530, #1534] + + Telemetry pipeline for resource monitoring data +- From 2.2.40 + + Fixed tracking of memory/cpu usage + + Do not prevent extensions from running if setting up cgroups fails + + Enable systemd-aware deprovisioning on all versions >= 18.04 + + Add systemd support for Debian Jessie, Stretch, and Buster + + Support for Linux Openwrt +- From 2.2.38 + + Fix CVE-2019-0804 + + Add fixes for handling swap file and other nit fixes +- From 2.2.37 + + Improves re-try logic to handle errors while downloading extensions + +------------------------------------------------------------------- +Thu Mar 7 18:21:15 UTC 2019 - Robert Schweikert + +- Add paa_cve_2019-0804.patch (bsc#1127838) + - An issue with swapfile handling in the agent creates a data leak situation + that exposes system memory data. + +------------------------------------------------------------------- +Thu Feb 7 17:09:52 UTC 2019 - Robert Schweikert + +- Update to 2.2.36 (bsc#1119542) + - Remove, included upstream + + paa_fix_driver_install_detect.patch + + paa_rdma_install_proper_driver.patch + + 0001-Obtain-platform-information-in-Python-version-depend.patch + + 0001-Detect-openSUSE-and-SLES.patch + + 0001-Handle-the-disapperance-of-net-tools.patch + + 0001-Properly-detect-SLES-15-for-rdma-support.patch + - Forward port agent-no-auto-update.patch + - [#1451] Do not utf-8 encode telemetry messages +- From 2.2.35 + + [#1434] Use files instead of pipes to capture stdout/stderr + + [#1431] Prevent multiple downloads of zips + + [#1418] Add main module to Python's egg + + [#1416] Fix UTF-8 encoding for telemetry payload + + [#1408] Honor the 'no_proxy' flag + + [#1391, #1401, #1441] Azure Stack improvements + + [#1384] Write status file in WALinuxAgent lib folder + + [#1375] Add support for Redhat + + [#1373] Handle different kernel builds on SUSE Linux Enterprise + + [#1365, #1385, #1389] Fixes for RDMA +- From 2.2.34 + + [#1397] Send events when extensions fail to complete operation + + [#1394/#1366] Fix the threshold telemetry issue + + [#1298] Implementing extension sequencing in azure Linux agent + + [#1340] Allow Clear Linux detection in python2 and python3 + + [#1345] FreeBSD swap issues fix (#1144) + + [#1349] Use append_file in Redhat6xOSUtil.openssl_to_openssh() + + [#1355] Ensure 'value' for authorized ssh keys end in "\n" + + [#1361] Remove main module +- From 2.2.32 + + [#1325] Enable cgroups by default on all distros + + [#1327, #1347] Allow enforcing of cgroups limits + + [#1337] Allow configuration for cgroups + + [#1333] Add support for NSBSD + + [#1319] Stream extension downloads to disk + (do not buffer the download in memory) + + [#1303] Fix to support custom DNS servers + + [#1306] Log extension stdout and stderr + + [#1302] Better of cloud-init configuration during deprovisioning + + [#1295] Fix to report the correct extension error code + + [#1289] Allow disabling the agent or extensions + + [#1290] Use the "ip route" command instead of the "route" comand + during network configuration + + [#1281] Delete JIT accounts + + [#1234] Fix for reading KVP values from host + + [#1287] Add UDEV rule in azure disk encryption +- From 2.2.31 +Upstream version jump + + [#1196] Health store integration + + [#1199] CGroups support + + [#1194] Use host for status reporting + + [#1188] Fix for sentinel and signal handlers + + [#1182] Telemetry updates + + [#1171] Add support for JIT + + [#1164] Fix for name resolution in Ubuntu 18.04 + + [#1154] Set connection close header + + [#1143] Remove extension packages after extraction +- From 2.2.26 + + Update Debian specific configuration and setup. +- From 2.2.25 + + Upstream version jump + + Revert extension manifest caching to prevent downgrade issues. +- From 2.2.20 + + This is a hotfix release for #945, details and mitigation are available + in the wiki. +- From 2.2.29 + + [#929] wire.py#update_goal_state does not handle out-of-date + GoalState errors + + [#908] Set Files to 0400 in /var/lib/waagent + + [#906] Hardcoded value for sshd's ClientAliveInterval (180) + + [#899] Improve HeartBeat Event + + [#898] Send dummy status if extension fails to write a #.status file + + [#897] 'Target handler state' wall of errors + + [#896] End of Line Comments are Not Supported nor Handled + + [#891] Create a Telemetry Event to Track Custom Data Execution + + [#884] Cleanup Old Goal State and Extension Cache + + [#876] The agent should use a scaling back-off when retrying HTTP requests + + [#869] The agent should report OS information in the correct JSON format. + + [#822] Update docs + +------------------------------------------------------------------- +Wed Jun 6 21:59:43 UTC 2018 - rjschwei@suse.com + +- Remove paa_up_only_to_push_hostname.patch + + Turns out the issue was a kernel bug and while ifdown ifup sequence to + bounce the hostname to the DHCP server is overkill we do not + want to carry a "cosmetic" patch + +------------------------------------------------------------------- +Tue Jun 5 19:26:14 UTC 2018 - rjschwei@suse.com + +- Add paa_up_only_to_push_hostname.patch (bsc#1094420) + +------------------------------------------------------------------- +Thu May 10 21:30:31 UTC 2018 - rjschwei@suse.com + +- Add 0001-Handle-the-disapperance-of-net-tools.patch (bsc#1092831) + + Switch to using "ip route" command +- Add paa_sudo_sle15_nopwd.patch + + Work around issue where SLE 15 will not accept the user password when + using sudo, cause unknown, needed to time constraints w.r.t. release +- Add 0001-Properly-detect-SLES-15-for-rdma-support.patch + + Properly detect SLES 15 for RDMA support + +------------------------------------------------------------------- +Mon Apr 2 15:51:08 UTC 2018 - rjschwei@suse.com + +- Add 0001-Detect-openSUSE-and-SLES.patch (bsc#1087764) + + Properly detect SLES 15 and openSUSE Leap 15 in Python 3 + +------------------------------------------------------------------- +Tue Mar 20 13:38:04 UTC 2018 - rjschwei@suse.com + +- Update paa_force_py3_sle15.patch (bsc#1061584) + + Another reference to python, which points to python2 + +------------------------------------------------------------------- +Tue Feb 27 20:36:45 UTC 2018 - rjschwei@suse.com + +- Add paa_force_py3_sle15.patch + + Force use of Python 3 for SLE 15 and later + +------------------------------------------------------------------- +Wed Feb 21 14:21:21 UTC 2018 - rjschwei@suse.com + +- Modify 0001-Obtain-platform-information-in-Python-version-depend.patch to + reflect agreed upon solution with upstream + +------------------------------------------------------------------- +Thu Feb 8 18:53:50 UTC 2018 - rjschwei@suse.com + +- Add 0001-Obtain-platform-information-in-Python-version-depend.patch + to fix build on distribution with Python 3.6 and later (boo#997614) + +------------------------------------------------------------------- +Fri Jan 5 19:46:36 UTC 2018 - rjschwei@suse.com + +- Fix RDMA driver package version install issue (bsc#1074865) + + Added paa_rdma_install_proper_driver.patch + +------------------------------------------------------------------- +Thu Oct 12 20:13:42 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.18 + + [#868] Fix for sudoer update + + [#886] Agent should not update outside of goal state + + [#889] Firewall removal should not retry + - Fixes issues introduces with 2.2.17 + +------------------------------------------------------------------- +Tue Oct 3 11:37:50 UTC 2017 - dimstar@opensuse.org + +- BuildRequire distribution-release instead of + openSUSE/sles-release. + +------------------------------------------------------------------- +Wed Sep 20 12:12:53 UTC 2017 - rjschwei@suse.com + +- Fix typo in dependency + +------------------------------------------------------------------- +Sat Sep 16 11:00:53 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.17 (bsc#1058974, bsc#1058975) + + Remove paa_noref_local_install.patch, included upstream + + Setup build for Python 3 for distros > SLE 12 + + [#879] -- OS.EnableFirewall=y breaks load balanced sets probing +- From 2.2.16 + + [#865] -- The agent should retry ETIMEDOUT (110) IOErrors +- From 2.2.15 + + [#783] -- The agent fails to use the standard Linux environment variables + for HTTP proxy + + [#784] -- Adjust http retry and logging + + [#786] -- Add Provisioning.SshHostKeyPairType=auto to support ssh-keygen -A + + [#791] -- Prevent bloating sudoers waagent when agent has problem + + [#792] -- Clearlinux distro_name does not match + + [#796] -- Accommodate new Clear Linux distro string in os-release + + [#798] -- Support Ubuntu RDMA driver update + + [#800] -- HostGAPlugin still use proxy while auto-updating + + [#801] -- Agent fails to clean-up PID files + + [#807] -- The agent should not emit duplicate events + + [#808] -- The agent should more gracefully handle out-of-space disk + errors (IOError 28) + + [#811] -- Comments inline in /etc/waagent.conf cause config to not be read + + [#812] -- Agent fails and isn't recoverable if an extension's log + directory is not present anymore + + [#823] -- Show config options in use + + [#830] -- Ensure VM identifier is properly ordered + + [#845] -- ')' is missed in show-configuration + + [#850] -- Cannot get to state 'Running' with Provisioning.Enabled=n + +------------------------------------------------------------------- +Fri Sep 8 18:33:06 UTC 2017 - rjschwei@suse.com + +- Add paa_fix_driver_install_detect.patch (bsc#1057888) + + Avoid the driver from re-installing if the same version is already + installed, this avoids an enless reboot loop + +------------------------------------------------------------------- +Mon Jul 24 14:12:07 UTC 2017 - rjschwei@suse.com + +- Add paa_noref_local_install.patch (bsc#1050229) + + Do not refresh the repos when we install the local RDMA kmp, + repo access has already failed, no need to try again + +------------------------------------------------------------------- +Sun Jul 23 13:33:39 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.14 (bsc#1050000) + + [#777] -- Deprovisioning when VM identifier changes is too aggressive + + [#769] -- HostGAPlugin requests should never go through proxy + + [#764] -- waagent -configuration-path:/path -start not take effect + + [#761] -- MetadataProtocol has no client object + + [#757] -- deprovision is executed even if input 'n' + + [#754] -- /etc/resolv.conf is removed if create a VM base on + an specialized image + + [#746] -- Agent WALinuxAgent-2.2.12 is blacklisted - skipping download + + [#740] -- Duplicate logging on RHEL/CentOS + + +------------------------------------------------------------------- +Sun Jul 23 13:10:40 UTC 2017 - rjschwei@suse.com + +- Remove timeout udev rules (bsc#1049480) + + 99-azure-timeout.rules + + Rule is broken + + Timeout is being set by the eagent code + +------------------------------------------------------------------- +Tue Jun 13 13:48:59 UTC 2017 - rjschwei@suse.com + +- Modify dependencies, systemd is runtime, not build + +------------------------------------------------------------------- +Thu Jun 8 19:44:25 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.13 (bsc#1042202, bsc#1042203) + + [#712] Initial support for OpenBSD + + [#730] Archlinux documentation + + [#743] Fix for FreeBSD resource disk discovery + + [#748] Fix for host plugin response encoding + + [#750] Fix for GAiA public key handling + + [#751] Fix for host plugin channel initialization + + [#752] Fix for AzureStack protocol error handling + + [#753] Removal of iptables rules from AzureStack protocol +- From 2.2.12 + + [#711] -- There are too many log print to /var/log/waagent.log + + [#714] -- Questionable split call in common/conf.py + + [#717] -- Remove extension logs during deprovision + + [#720] -- Reset of RDMA drivers not taking effect + + [#721] -- WALA deprovision process not clean up all cloudinit files + + [#724] -- Location of configuration file should be editable issue + + [#725] -- v2.2.11 can throw unexpected exceptions on provisioned VMs + + [#727] -- v2.2.11 cannot update status for RDFE VMs +- From 2.2.11 + + [#463] Ensure the transport certificate expires in no more than two + years enhancement + + [#470] Emit goal state processing performance metrics enhancement + + [#518] Align with the Azure Stack protocol enhancement + + [#531] Location of configuration file should be editable feature request + + [#604] v2.2.x - Need new OS.SshDir in waagent.conf feature request + + [#631] Will "waagent -deprovision[+user]" wipe the cloud-init data? + feature request + + [#668] Agent continuously logs error on FIPS compliant server + + [#679] Enable auto-update for AzureStack feature request + + [#682] Default route is not added if it already exists cla-not-required + + [#684] mkfs options out of order + + [#685] Change option order for mkfs. Alpine is being picky + + [#686] Use of hostnameclt causes hostname rename lowercase for RHEL 7.x + + [#687] Enable customer-supported cloud-init + + [#688] Agent should purge /var/lib/waagent/events if it gets full + + [#689] Remove superseded extension folders / zip files + + [#693] Agent should remove unused extension directories and zip + files enhancement + + [#694] Agent should not issue an HTTP HEAD to determine status blob + type enhancement + + [#695] Ensure all udev rules are copied in Ubuntu cla-not-required + + [#699] [2.2.10] Some questions about Extension clean up + + [#701] Reduce polling time for extension processing + + [#706] Provision Event is not Fired if Customer Forgets to Deprovision VM + +------------------------------------------------------------------- +Fri Apr 21 10:44:52 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.10 (bsc#1035418, bsc#1035419) + + [#675] Clean up extension directories + + [#673] Provisioning logging improvements + + [#674] Override decode custom data + + [#670] Add Arch distro support +- From version 2.2.9 + + [#665] Networking logging cleanup + + [#666] Keygen logging cleanup + + [#667] Reduce the monitoring loop wait time +- From version 2.2.8 + + [#649] Improve host plugin failure handling + + [#647] Add telemetry for put status failures + + [#646] Improve extension handler logging + + [#645] Reduce guest agent update logging + + [#644] Add basic 32-bit support to interface detection + + [#641] Better heartbeat exception handling + + [#640] Better unhandled exception logging + + [#638] Improve NSG state management + + [#637] Better handling and cleanup of old events + + [#635] Pass environment variables to subprocess + + [#634] Improve RDMA package matching + + [#629] Better handling of resource disk mounting + + [#624] Data disks udev rule + + [#614] Add support for EulerOS +- From version 2.2.7 + + [#625] Enabled PageBlob support through HostGAPlugin + +------------------------------------------------------------------- +Mon Mar 13 20:59:29 UTC 2017 - rjschwei@suse.com + +- Update to version 2.2.6 (bsc#1029223, bsc#1029224) + + [#611] Improve logging when interface detection fails + + [#603] Retry when get thuimbprint fails + + [#602] Ensure host plugin calls fail gracefully + + [#601] Handle interface resets more gracefully + + [#600] Wait for partition before mounting + + [#599] Correct check for heartbeat freshness + + [#594] Fix RDMA reboot issue + + [#588] Changed permissions for log directory +- From 2.2.5 + + [#587] Fix potential sync issue with incarnation number and cache +- From 2.2.4 + + [#579] Extend VM health status + + [#578] Fix FreeBSD deprovision + + [#577] Improve mount call and logging + + [#573] Centos 7.0 hostnamectl fix + +------------------------------------------------------------------- +Fri Jan 27 15:12:29 UTC 2017 - rjschwei@rjsdomain + +- Update to version 2.2.3 (bsc#1018369) + + NSG improvements + + CoreOS fix + + Debian fixes + + Apply patch from Debian + + Unhandled errors + + Handle ExtensionError from decide_version + + Correct mkfile size check + + Add a log message when primary nic is not found + + Add telemetry event for host plugin usage + + Fix typo in log message + + Prevent duplicates in sysinfo + + Add support for Match blocks in sshd config + + Fix the logic for agent version + + Support offline hostname changes + + Ensure config file is updated correctly + + Support NetworkManager leases + + Fix password encoding + + Minor bug fixes + + Fix for hostnamectl + + RHEL-7 hostname + + Fix password encrypting failure in python 2.* + + Handle interrupt signal + + Fix the issues for mounting resourcedisk +- From 2.2.2 + + Cleanup SUSE config + + Support for F5 Networks BIG-IP + + Fix sfdisk options + + Fix for fetch manifest + + Fix config options for RDMA + + Fix issue with xfs swapon + + Add Clear Linux distro support + + Handle deprovisioning interruption + + Reduce goal state logging + + Increase polling rate + + RHUI cleanup + + Add restart_if function for Alpine + + Support OnHold flag + + Fix for decode_config + + Azure stack certificate fix + + Enable over-provisioning support + + Enable host plugin scenarios + + RDMA updates + + sfdisk logging fix + + Big IP updates +- From 2.2.1 + + Correct the installed version check in decide_version + +------------------------------------------------------------------- +Wed Oct 5 13:02:06 UTC 2016 - rjschwei@suse.com + +- Add comment to specfile clarifying the Provides directive lifespan + +------------------------------------------------------------------- +Mon Oct 3 20:56:00 UTC 2016 - rjschwei@suse.com + +- Update to version 2.2.0 + + Non linear release number jump + + Add agent-no-auto-update.patch + + [#361] More graceful 503 handling + + [#364] Enforce http proxy support for calls to storage + + [#367] Stop disabling SELinux during provisioning + + [#377] Fix partition table race condition + + [#387] Fix latest version selection + + [#388] Fix extension substatus structure + + [#389] Fix shlex related update bug in Python 2.6 + + [#391] Correct behavior of register-service + + [#398] AzureStack fixes + + [#400] Support xfs filesystem + + [#404] Correct service start/restart behavior + + [#411] Support for disabling provisioning + + [#417] Stop spamming journal with pidof dhlient related messages + + [#418] Add goal state processor to the version output + + [#425] Fix walinuxagent.service Want, After + + [#439] Ensure to load latest agents + + [#451] Correct proxy port type + +------------------------------------------------------------------- +Tue Sep 13 18:03:20 UTC 2016 - rjschwei@suse.com + +- Upstream releases a tarball WALinuxAgent-%{version} while this is + a reminder of days gone by, as in Windows Azure, it is less confusing + and less work if we stay with the upstream source name vs. renaming + the tarball. + +------------------------------------------------------------------- +Mon Aug 29 18:45:25 UTC 2016 - bear454@opensuse.org + +- Update to version 2.1.6 (bsc#994592) + + improved RDMA support + + extension state migration + + Alpine Linux support + + fixes for #347, #351, #353 + +------------------------------------------------------------------- +Tue Aug 9 11:48:56 UTC 2016 - rjschwei@suse.com + +- Require eject (bsc#992796,bsc#992797) + +------------------------------------------------------------------- +Tue Jul 26 12:20:38 UTC 2016 - bbrunner@suse.com + +- Added version to Provides: WALinuxAgent + +------------------------------------------------------------------- +Mon Jul 25 15:12:55 UTC 2016 - rjschwei@suse.com + +- Replace Conflicts directive with Provides, Obsoletes pair + (bsc#990424, bsc#990489) + +------------------------------------------------------------------- +Wed Jul 20 14:57:12 UTC 2016 - rjschwei@suse.com + +- Update to version 2.1.5 (bsc#989789) + + Remove 99-azure-product-uuid.rules included from upstream + + Remove python-azure-agent-setup.diff no longer needed + + Remove python-azure-agent-disable-test-check-pid.diff + + Disable tests + - Test have been re-written such that they are expected to run in + Azure, since we build the package in the build service 95% fail + + goal state processing extension + + multi-nic improvements + + Fix failed to mount Resource Disk #145 + + Fix PID file not updating on service restart #141 + + Fix libglibmm-2.4-1c2a dependency #133 + + Fix Creating a swap file takes too long #116 + + Fix ERROR:unicode argument without an encoding occured creating + /var/lib/waagent/CustomData #187 + + Fix Should evaluate ssh pub key file before using it #169 + + Fix waagent fails to deploy SSH key on CentOS 7 #104 + + Fix Creating a swapfile using dd is extremely slow, please use + fallocate on Linux #127 + + Fix ERROR:Unable to fetch Bundle URI from manifest for + Microsoft.OSTCExtensions.LinuxDiagnostic v 2.3.4 #163 + + Fix Incorrect host route set for 168.63.129.16 on machines with + multiple NICs (CentOS 7) #190 + + agent list trim fix + + telemetry improvements + + signal forwarding fix + + self-update bug-fixes + + poll timeout fix + + RDMA updates + + telemetry updates + + use dhcp cache for CentOS + + output buffering fix + + rdma config files + + sigterm forwarding + + reduced log verbosity + + extension manager self-update + + multi-nic improvements + + scvmm fixes + +------------------------------------------------------------------- +Wed Jul 13 12:27:19 UTC 2016 - rjschwei@suse.com + +- Do not conflict with NetworkManager (bsc#988743) + + we want to allow users to install the WE pattern in Azure. This is + not possible if python-azure-agent conflicts with NetworkManager. + Testing shows that the system is still accessible if NM is installed + after the initial boot that sets up networking. The downside, during + image build a user could incidentally install NM and the agent and forget + to disable NM, an instance from this image may not be reachable. + +------------------------------------------------------------------- +Tue Jul 12 07:13:59 UTC 2016 - rjschwei@suse.com + +- Apply patch python-azure-agent-disable-test-check-pid.diff with patch + macro to appease SLES 11 build service checks + +------------------------------------------------------------------- +Sat May 21 10:21:29 UTC 2016 - rjschwei@suse.com + +- Update to version 2.1.4 (bsc#980789, bsc#980790) + + Support for FreeBSD + + Fix a bug for internal extension version resolving + +------------------------------------------------------------------- +Mon Apr 18 10:11:08 UTC 2016 - jgleissner@suse.com + +- Renamed python-azure-agent-setup.diff to python-agent-azure-setup.diff +- Package tests in sub package + +------------------------------------------------------------------- +Fri Apr 15 16:39:12 UTC 2016 - jgleissner@suse.com + +- Do not package tests (python-agent-azure-setup.diff, bsc#974899) +- Enable unit tests during build +- Disable test_check_pid (fails if /proc is not available, + python-azure-agent-disable-test-check-pid.diff) +- Do not run sed on every file (corrupts sample_ext.zip) +- Do not mark /usr/lib/udev/rules.d files as %config + +------------------------------------------------------------------- +Tue Apr 5 11:54:47 UTC 2016 - jgleissner@suse.com + +- Include in SLE 11 and SLE 12 Public Cloud modules (bnc#973427 + fate#320692) + +------------------------------------------------------------------- +Thu Feb 4 23:01:32 UTC 2016 - rjschwei@suse.com + +- Update to version 2.1.3 + + Refactor distro class + + Fixed protocol detection on Azure Stack + + Fix extension handling issue + + Allow overwrite existing user + + Decode and execute custom data + +------------------------------------------------------------------- +Tue Nov 10 16:11:12 UTC 2015 - rjschwei@suse.com + +- Initial build + + Version 2.1.2.rc2 + diff --git a/python-azure-agent.spec b/python-azure-agent.spec new file mode 100644 index 0000000..c442516 --- /dev/null +++ b/python-azure-agent.spec @@ -0,0 +1,332 @@ +# +# spec file for package python-azure-agent +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-azure-agent +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 +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 +BuildRequires: dos2unix + +BuildRequires: distribution-release +BuildRequires: openssl +BuildRequires: python-rpm-macros +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +BuildRequires: python3-distro +BuildRequires: python3-setuptools +%else +BuildRequires: python-setuptools +BuildRequires: python-xml +%endif +BuildRequires: pkgconfig(udev) +Requires: eject +Requires: grep +Requires: iptables +Requires: logrotate +Requires: openssh +Requires: openssl +Requires: pwdutils +Requires: systemd +Requires: sysvinit-tools +%if 0%{?suse_version} && 0%{?suse_version} <= 1500 +Requires: wicked +%endif +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +Requires: python3-distro +Requires: python3-pyasn1 +Requires: python3-xml +%else +Requires: python-pyasn1 +Requires: python-xml +%endif +Requires: sudo +Requires: util-linux + +# Package renamed in SLE 12, do not remove Provides, Obsolete directives +# until after SLE 12 EOL +Provides: WALinuxAgent = %{version} +Obsoletes: WALinuxAgent < %{version} + +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%description +The azure-agent supports the provisioning and running of Linux +VMs in the Microsoft Azure Public Cloud and Microsoft Azure Stack private +cloud. This package should be installed on Linux disk +images that are built to run withing the Microsoft Azure or +Microsoft Azure Stack framework. + +%package test +Summary: Unit tests +Group: Development/Languages/Python +Requires: %{name} == %{version} +Requires: openssl +%if 0%{?suse_version} > 1315 +Requires: python3-pytest +%else +Requires: python-mock +Requires: python-pytest +%endif + +%description test +Unit tests for python-azure-agent. + +%package config-default +Summary: Default upstream configuration +Group: Development/Languages/Python +Requires: %{name} == %{version} +Provides: waagent-config +Conflicts: otherproviders(waagent-config) + +%description config-default +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 +Conflicts: otherproviders(waagent-config) + +%description config-server +Modified waagent.conf file to meet SUSE policies and SUSE image build +setup + +%package config-hpc +Summary: SUSE specific configuration for HPC +Group: Development/Languages/Python +Requires: %{name} == %{version} +Provides: waagent-config +Conflicts: otherproviders(waagent-config) + +%description config-hpc +Modified waagent.conf file to meet SUSE policies and SUSE image build +setup + +%package config-micro +Summary: SUSE specific configuration for Micro +Group: Development/Languages/Python +Requires: %{name} == %{version} +Provides: waagent-config +Conflicts: otherproviders(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} && 0%{?suse_version} > 1315 && 0%{?sle_version} +%patch -P 6 +%endif +%patch -P 7 +%patch -P 8 +%patch -P 9 -p1 +%patch -P 10 + +%build +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +python3 setup.py build +%else +python setup.py build +%endif + +%install +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +python3 setup.py install --prefix=%{_prefix} --lnx-distro='suse' --root=%{buildroot} +%else +python setup.py install --prefix=%{_prefix} --lnx-distro='suse' --root=%{buildroot} +%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 +# 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 +# We use clod-init +sed -i -e "s/Provisioning.Agent=auto/Provisioning.Agent=cloud-init/" %{buildroot}%{_sysconfdir}/waagent.conf +# Leave the ephemeral disk handling to cloud-init +sed -i -e "s/ResourceDisk.Format=y/ResourceDisk.Format=n/" %{buildroot}%{_sysconfdir}/waagent.conf +cp %{buildroot}%{_sysconfdir}/waagent.conf %{buildroot}%{_sysconfdir}/waagent.conf.server +# HPC setup is addition to SUSE server configuration +# While there is no more specific driver we still need to enable +# RDMA to make the logic in the agent set up the IB interface +sed -i -e "s/# OS.EnableRDMA=y/OS.EnableRDMA=y/" %{buildroot}%{_sysconfdir}/waagent.conf +cp %{buildroot}%{_sysconfdir}/waagent.conf %{buildroot}%{_sysconfdir}/waagent.conf.hpc +# Micro setup +# Undo the HPC change +sed -i -e "s/OS.EnableRDMA=y/# OS.EnableRDMA=y/" %{buildroot}%{_sysconfdir}/waagent.conf +# Use Ignition/Afterburn in Micro +sed -i -e "s/Provisioning.Agent=cloud-init/Provisioning.Agent=disabled/" %{buildroot}%{_sysconfdir}/waagent.conf +# No extension support for transactional-upfdate systems +# There's an inherant bug in that root password reset is also treated via this +# switch +sed -i -e "s/Extensions.Enabled=y/Extensions.Enabled=n/" %{buildroot}%{_sysconfdir}/waagent.conf +mv %{buildroot}%{_sysconfdir}/waagent.conf %{buildroot}%{_sysconfdir}/waagent.conf.micro + +ln -s service %{buildroot}%{_sbindir}/rcwaagent +mkdir -p %{buildroot}/%{_unitdir} + +# Deal with logic embeded in the code that puts the unit file where we do not +# want it, sometimes (depending on teh build environment) +if [ -e %{buildroot}/lib/systemd/system ]; then +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 +### log file ghost +mkdir -p %{buildroot}/%{_localstatedir}/log +touch %{buildroot}/%{_localstatedir}/log/waagent.log +### permissinon fixes +chmod +x %{buildroot}/%{_sbindir}/waagent2.0 +### naming issues +%if 0%{?suse_version} > 1500 +mkdir -p %{buildroot}%{_distconfdir}/logrotate.d +mv %{buildroot}/%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}/%{_distconfdir}/logrotate.d/waagent +%else +mv %{buildroot}/%{_sysconfdir}/logrotate.d/waagent.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/waagent +%endif + +# install tests +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +cp -r tests %{buildroot}/%{python3_sitelib}/azurelinuxagent +%else +cp -r tests %{buildroot}/%{python_sitelib}/azurelinuxagent +%endif + +%pre +%service_add_pre waagent.service +%if 0%{?suse_version} > 1500 +# Prepare for migration to /usr/etc; save any old .rpmsave +for i in logrotate.d/waagent ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: +done +%endif + +%if 0%{?suse_version} > 1500 +%posttrans +# Migration to /usr/etc, restore just created .rpmsave +for i in logrotate.d/waagent ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif + +%post +%service_add_post waagent.service + +%preun +%service_del_preun waagent.service + +%postun +%restart_on_update waagent +%service_del_postun waagent.service + +%post config-default +rm -rf %{_sysconfdir}/waagent.conf +ln -s %{_sysconfdir}/waagent.conf.default %{_sysconfdir}/waagent.conf + +%post config-server +rm -rf %{_sysconfdir}/waagent.conf +ln -s %{_sysconfdir}/waagent.conf.server %{_sysconfdir}/waagent.conf + +%post config-hpc +rm -rf %{_sysconfdir}/waagent.conf +ln -s %{_sysconfdir}/waagent.conf.hpc %{_sysconfdir}/waagent.conf + +%post config-micro +rm -rf %{_sysconfdir}/waagent.conf +ln -s %{_sysconfdir}/waagent.conf.micro %{_sysconfdir}/waagent.conf + +%files +%defattr(0644,root,root,0755) +%doc NOTICE README.md +%license LICENSE.txt +%exclude %{_sysconfdir}/waagent.conf* +%{_sbindir}/rcwaagent +%attr(0755,root,root) %{_sbindir}/waagent +%attr(0755,root,root) %{_sbindir}/waagent2.0 +%if 0%{?suse_version} > 1500 +%{_distconfdir}/logrotate.d/waagent +%else +%config(noreplace) %{_sysconfdir}/logrotate.d/waagent +%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} && 0%{?suse_version} > 1315 +%dir %{python3_sitelib}/azurelinuxagent +%{python3_sitelib} +%exclude %{python3_sitelib}/azurelinuxagent/tests +%else +%dir %{python_sitelib}/azurelinuxagent +%{python_sitelib} +%exclude %{python_sitelib}/azurelinuxagent/tests +%endif + +%files test +%defattr(0644,root,root,0755) +%if 0%{?suse_version} && 0%{?suse_version} > 1315 +%{python3_sitelib}/azurelinuxagent/tests +%else +%{python_sitelib}/azurelinuxagent/tests +%endif + +%files config-default +%ghost %{_sysconfdir}/waagent.conf +%config(noreplace) %{_sysconfdir}/waagent.conf.default + +%files config-server +%ghost %{_sysconfdir}/waagent.conf +%config(noreplace) %{_sysconfdir}/waagent.conf.server + +%files config-hpc +%ghost %{_sysconfdir}/waagent.conf +%config(noreplace) %{_sysconfdir}/waagent.conf.hpc + +%files config-micro +%ghost %{_sysconfdir}/waagent.conf +%config(noreplace) %{_sysconfdir}/waagent.conf.micro + +%changelog diff --git a/remove-mock.patch b/remove-mock.patch new file mode 100644 index 0000000..93546f4 --- /dev/null +++ b/remove-mock.patch @@ -0,0 +1,160 @@ +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 diff --git a/reset-dhcp-deprovision.patch b/reset-dhcp-deprovision.patch new file mode 100644 index 0000000..9d5fbc1 --- /dev/null +++ b/reset-dhcp-deprovision.patch @@ -0,0 +1,56 @@ +--- azurelinuxagent/pa/deprovision/factory.py.orig ++++ azurelinuxagent/pa/deprovision/factory.py +@@ -22,6 +22,7 @@ from .arch import ArchDeprovisionHandler + from .clearlinux import ClearLinuxDeprovisionHandler + from .coreos import CoreOSDeprovisionHandler + from .default import DeprovisionHandler ++from .suse import SUSEDeprovisionHandler + from .ubuntu import UbuntuDeprovisionHandler, Ubuntu1804DeprovisionHandler + + +@@ -39,6 +40,8 @@ def get_deprovision_handler(distro_name= + return CoreOSDeprovisionHandler() + if "Clear Linux" in distro_full_name: + return ClearLinuxDeprovisionHandler() # pylint: disable=E1120 ++ if distro_name in ("suse", "sle_hpc", "sles", "opensuse"): ++ return SUSEDeprovisionHandler() + + return DeprovisionHandler() + +--- /dev/null ++++ azurelinuxagent/pa/deprovision/suse.py +@@ -0,0 +1,34 @@ ++# Microsoft Azure Linux Agent ++# ++# Copyright 2022 Microsoft Corporation ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# Requires Python 2.6+ and Openssl 1.0+ ++# ++ ++import azurelinuxagent.common.utils.fileutil as fileutil ++from azurelinuxagent.pa.deprovision.default import DeprovisionHandler, \ ++ DeprovisionAction ++ ++class SUSEDeprovisionHandler(DeprovisionHandler): ++ def __init__(self): ++ super(SUSEDeprovisionHandler, self).__init__() ++ ++ def reset_hostname(self, warnings, actions): ++ localhost = ["AUTO"] ++ actions.append(DeprovisionAction(self.osutil.set_hostname, ++ localhost)) ++ actions.append(DeprovisionAction(self.osutil.set_dhcp_hostname, ++ localhost)) ++