After upgrading a SLES Azure VM, waagent.service fails to start
This document (000021502) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15
Microsoft Azure Virtual Machines
Situation
After upgrading the Azure VM, waagent.service fails to start, and the following message appears in the logs in /var/log/messages:
2024-07-20T06:30:32.403804-04:00 AZEALXAUTHD28 python[12413]: NameError: global name 'distro' is not defined
Additionally, packages that provide versions of Python that are not supported on SLES 15 are installed. You can confirm this point by running the following command:
rpm -qa --queryformat "%-35{NAME} %-35{DISTRIBUTION} %{VERSION}-%{RELEASE}\n" | sort -k 1,2 -t " " -i | grep -v 'e\ 15' | grep -i 'python'
This command will search RPM output for any Python packages that are not targeting SLES 15. These packages are not supported on SLES 15.
Resolution
To resolve this issue, remove any Python and libpython packages and Python module packages that are not supported on SLES 15. To get a list of these packages, run the rpm command shown in the 'Environment' section of this article. Once the packages are removed, run the following two commands to reinstall python-azure-agent to repair the installation:
rpm -e --nodeps python-azure-agent zypper in python-azure-agent
Cause
Additional Information
There may be other incompatible packages on this server leftover from upgrades from previous major versions of SLES. To get more information about this, run supportconfig and view the file rpm.txt therein. This will list all installed packages and will show which distribution they are from. All packages that show a version of SLES other than SLES 15 are incompatible with SLES 15 and should be removed.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021502
- Creation Date: 22-Jul-2024
- Modified Date:08-Nov-2024
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com