Azure/WALinuxAgent

[BUG] WALinuxAgent not updating to latest on Ubuntu

marchesir opened this issue · 3 comments

hi,

i am building an azure vm via packer from azure marketplace and the bundled WALinuxAgent is a deprecated version and cant be updated to anything current using the distro package manager, the ubuntu/azure repo used:
deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main

i have tried on ubuntu 22 also with same results, this is output i get on the azure vm:

waagent --version
/usr/sbin/waagent:27: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
WALinuxAgent-2.2.46 running on ubuntu 20.04
Python: 3.8.10
Goal state agent: 2.9.1.1

sudo apt-get install walinuxagent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
walinuxagent is already the newest version (2.2.46-0ubuntu1.2).
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.

azure docs (https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/support-extensions-agent-version) say v2.2.53.1 should be minimum installed but as can be seen i cant update beyond v2.2.46.

i know it can be installed manually but the azure docs say to use distro package manager.

any suggestions why the WALinuxAgent is not getting updates would be much appreciated

regards

Richard

hi,
so it looks like we do have the latest but this is very confusing.
so waagent --version indicates the old version:

/usr/sbin/waagent:27: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
WALinuxAgent-2.2.46 running on ubuntu 20.04
Python: 3.8.10
Goal state agent: 2.9.1.1

bur when i check the status of the service its launching a different version:

sudo systemctl status walinuxagent 
● walinuxagent.service - Azure Linux Agent
     Loaded: loaded (/lib/systemd/system/walinuxagent.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/walinuxagent.service.d
             └─10-Slice.conf, 11-CPUAccounting.conf, 12-CPUQuota.conf, 13-MemoryAccounting.conf
     Active: active (running) since Mon 2023-10-30 10:56:24 UTC; 1h 12min ago
   Main PID: 813 (python3)
      Tasks: 7 (limit: 38502)
     Memory: 74.6M
        CPU: 6.411s
     CGroup: /azure.slice/walinuxagent.service
             ├─ 813 /usr/bin/python3 -u /usr/sbin/waagent -daemon
             └─**1237 python3 -u bin/WALinuxAgent-2.9.1.1-py3.8.egg -run-exthandlers**

i may have misread but its very confusing

great thanks @narrieta much appreciated