17
0
Files
python-azure-agent/reset-dhcp-deprovision.patch
Robert Schweikert cee043a026 - 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)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/python-azure-agent?expand=0&rev=85
2022-08-11 20:40:12 +00:00

57 lines
2.2 KiB
Diff

--- 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))
+