Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-azure-agent for 
openSUSE:Factory checked in at 2022-05-12 23:00:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-agent (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-agent.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-agent"

Thu May 12 23:00:56 2022 rev:20 rq:976608 version:2.2.49.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-azure-agent/python-azure-agent.changes    
2021-02-07 15:24:25.394226872 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-azure-agent.new.1538/python-azure-agent.changes
  2022-05-12 23:01:56.744924518 +0200
@@ -1,0 +2,8 @@
+Thu May  5 12:13:47 UTC 2022 - Robert Schweikert <rjsch...@suse.com>
+
+- 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.
+
+-------------------------------------------------------------------

New:
----
  reset-dhcp-deprovision.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-azure-agent.spec ++++++
--- /var/tmp/diff_new_pack.lTkv8o/_old  2022-05-12 23:01:57.464925485 +0200
+++ /var/tmp/diff_new_pack.lTkv8o/_new  2022-05-12 23:01:57.468925491 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-azure-agent
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,7 @@
 Patch6:         paa_force_py3_sle15.patch
 Patch11:        proper_dhcp_config_set.patch
 Patch12:        sle_hpc-is-sles.patch
+Patch13:        reset-dhcp-deprovision.patch
 BuildRequires:  dos2unix
 
 BuildRequires:  distribution-release
@@ -123,6 +124,7 @@
 %endif
 %patch11
 %patch12 -p1
+%patch13
 
 %build
 %if 0%{?suse_version} && 0%{?suse_version} > 1315

++++++ reset-dhcp-deprovision.patch ++++++
--- azurelinuxagent/pa/deprovision/factory.py.orig
+++ azurelinuxagent/pa/deprovision/factory.py
@@ -22,6 +22,7 @@ from .default import DeprovisionHandler
 from .arch import ArchDeprovisionHandler
 from .clearlinux import ClearLinuxDeprovisionHandler
 from .coreos import CoreOSDeprovisionHandler
+from .suse import SUSEDeprovisionHandler
 from .ubuntu import UbuntuDeprovisionHandler, Ubuntu1804DeprovisionHandler
 
 
@@ -42,6 +43,8 @@ def get_deprovision_handler(distro_name=
         return CoreOSDeprovisionHandler()
     if "Clear Linux" in distro_full_name:
         return ClearLinuxDeprovisionHandler()
+    if distro_name in ("suse", "sle_hpc", "sles", "opensuse"):
+        return SUSEDeprovisionHandler()
 
     return DeprovisionHandler()
 
--- /dev/null
+++ azurelinuxagent/pa/deprovision/suse.py
@@ -0,0 +1,33 @@
+# 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))

Reply via email to