SUSE Support

Here When You Need Us

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

Python 2 is not supported or compatible with SLES 15, so if these packages are installed then issues will occur. These Python 2 packages were likely leftover from a migration from a previous major version of SLES. Usually, these packages should be removed, so the presence of these packages indicates an issue with the upgrade procedure being used. If you would like to look into this further to find an issue with the upgrade procedure that was used, please open a support case with SUSE Support and we will be happy to help.

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.