Skip to content

DLPX-94448 walinuxagent.service fails to load on LTS 24.04 #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

david-mendez1
Copy link
Contributor

@david-mendez1 david-mendez1 commented Jun 10, 2025

Problem

All the stress runs on Azure are failing due to the walinuxagent (Azure Linux agent) fails to load on engines running LTS 24.04. Stress runs include a monitor thread which verifies that no systemd services are in a failed state.

root@dm-azure:/export/home/delphix# systemctl |grep failed
● walinuxagent.service                                loaded failed failed    Azure Linux Agent

Get the following error when running the waagent

File "/usr/sbin/waagent", line 35, in <module>
    import azurelinuxagent.agent as agent
  File "/usr/lib/python3/dist-packages/azurelinuxagent/agent.py", line 31, in <module>
    from azurelinuxagent.common import cgroupconfigurator, logcollector
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/cgroupconfigurator.py", line 26, in <module>
    from azurelinuxagent.common.cgroup import CpuCgroup, AGENT_NAME_TELEMETRY, MetricsCounter, MemoryCgroup
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/cgroup.py", line 25, in <module>
    from azurelinuxagent.common.osutil import get_osutil
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/__init__.py", line 18, in <module>
    from azurelinuxagent.common.osutil.factory import get_osutil
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 22, in <module>
    from azurelinuxagent.common.version import DISTRO_NAME, DISTRO_CODE_NAME, DISTRO_VERSION, DISTRO_FULL_NAME
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/version.py", line 234, in <module>
    __distro__ = get_distro()
                 ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/version.py", line 114, in get_distro
    osinfo = get_linux_distribution(0, 'alpine')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/future.py", line 95, in get_linux_distribution
    return get_linux_distribution_from_distro(get_full_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/azurelinuxagent/common/future.py", line 106, in get_linux_distribution_from_distro
    distro.linux_distribution(
    ^^^^^^
NameError: name 'distro' is not defined

Solution

Problem is the python3-distro package is needed for the waagent and it is not included.

root@dlpx-qa-dose-develop-qar-179071-766f97e2:/var/log# pip show distro
WARNING: Package(s) not found: distro

Fix by adding it to the debian/rules as a dependency for Azure.

Testing Done

ab-pre-push: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/11360/

Manually installed python3-distro:

root@dm-azure:/export/home/delphix# apt list python3-distro
Listing... Done
python3-distro/focal,now 1.4.0-1 all [installed]

Now the service is running:

root@dm-azure:/export/home/delphix# systemctl status  walinuxagent.service
● walinuxagent.service - Azure Linux Agent
     Loaded: loaded (/usr/lib/systemd/system/walinuxagent.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/walinuxagent.service.d
             └─12-CPUQuota.conf
     Active: active (running) since Tue 2025-06-10 21:53:42 UTC; 10s ago

Engine from ab-pre-push:

root@dm-azure-pr:/export/home/delphix# systemctl status walinuxagent.service
● walinuxagent.service - Azure Linux Agent
     Loaded: loaded (/usr/lib/systemd/system/walinuxagent.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/walinuxagent.service.d
             └─12-CPUQuota.conf
     Active: active (running) since Wed 2025-06-11 17:15:57 UTC; 14min ago
   Main PID: 3409 (python3)
      Tasks: 7 (limit: 7672)
     Memory: 55.8M (peak: 59.6M)

@david-mendez1 david-mendez1 force-pushed the dlpx/pr/david-mendez1/c09aa3e8-0d20-4e82-99eb-6791f046edf7 branch from 3200524 to 9f6c475 Compare June 10, 2025 23:12
@david-mendez1 david-mendez1 force-pushed the dlpx/pr/david-mendez1/c09aa3e8-0d20-4e82-99eb-6791f046edf7 branch from 9f6c475 to ff95e21 Compare June 10, 2025 23:28
@david-mendez1 david-mendez1 marked this pull request as ready for review June 11, 2025 00:00
@david-mendez1 david-mendez1 merged commit 1717222 into develop Jun 11, 2025
24 checks passed
@david-mendez1 david-mendez1 deleted the dlpx/pr/david-mendez1/c09aa3e8-0d20-4e82-99eb-6791f046edf7 branch June 11, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants