Skip to content
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

Azure Monitor Agent does not support Ubuntu 24.04 #1935

Open
jantekb opened this issue Jul 9, 2024 · 15 comments
Open

Azure Monitor Agent does not support Ubuntu 24.04 #1935

jantekb opened this issue Jul 9, 2024 · 15 comments

Comments

@jantekb
Copy link

jantekb commented Jul 9, 2024

When installed on a vanilla Ubuntu 24.04 image, the deployment fails with the below error:

[ExtensionOperationError] Non-zero exit code: 51, /var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./shim.sh -install [stdout] Python 3.12.3 Importing utils failed with error: No module named 'imp' Unable to initialize waagent log because of exception name 'waagent' is not defined Info: Azure Monitoring Agent for Linux started to handle. Error: Unsupported operating system: ubuntu 24.04 Error: Unsupported operating system: ubuntu 24.04 [stderr] /var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./agent.py:38: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13 import crypt

@hAislt
Copy link

hAislt commented Jul 9, 2024

Same here.
What about those versions below? I also tried with those through TF but they are not listed in MS docs and it didn't work.

az vm extension image list-versions --publisher Microsoft.Azure.Monitor --name AzureMonitorLinuxAgent --location "EastUs"

"id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.31.1",
    "location": "eastus",
    "name": "1.31.1"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.5.126",
    "location": "eastus",
    "name": "1.5.126"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.5.127",
    "location": "eastus",
    "name": "1.5.127"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.5.133",
    "location": "eastus",
    "name": "1.5.133"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.6.2",
    "location": "eastus",
    "name": "1.6.2"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.7.0",
    "location": "eastus",
    "name": "1.7.0"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.7.1",
    "location": "eastus",
    "name": "1.7.1"
  },
  {
    "id": "/Subscriptions/x/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Monitor/ArtifactTypes/VMExtension/Types/AzureMonitorLinuxAgent/Versions/1.9.1",
    "location": "eastus",
    "name": "1.9.1"
  }
]

@zaubergulasch
Copy link

zaubergulasch commented Jul 15, 2024

Same here with pfsense / FreeBSD 15 (Azure Image)

[Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1] Indeterminate operating system 2024/07/15 09:48:55 [Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1] Install,failed,51,Indeterminate operating system Failed to check disk usage. [stderr] /var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./agent.py:38: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13 import crypt

-_-

@jungsooooo
Copy link

same here
[stderr]
/var/lib/waagent/Microsoft.Azure.Monitor.AzureMonitorLinuxAgent-1.31.1/./agent.py:38: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
import crypt
'.

@TheKrisSodroski
Copy link

I get a similar error, where it 's complaining about 'imp' not being found. Python 3.13 on the latest 24.04 ubuntu image.

Reverting back to this image allows it to install/provision:

"imageReference": {
          "publisher": "canonical",
          "offer": "0001-com-ubuntu-server-jammy",
          "sku": "22_04-lts-gen2",
          "version": "latest"
        },

@eric-desrochers
Copy link

Any update on this bug ? (For reference, it's a duplicate of #1908)

@JohnRusk
Copy link
Member

I believe that the pattern of dynamically loading waagent is probably considered deprecated now. I logged some details here: #1956 1956

@DavidGarrana
Copy link

With the nearing Log Analytics Agent deprecation, more than never making AMA support stable versions of Linux should be priority. Ubuntu 24.04 LTS was officially released almost 4 months ago. Can we get a date here?

@DavidGarrana
Copy link

DavidGarrana commented Aug 23, 2024 via email

@marcurdy
Copy link

marcurdy commented Aug 23, 2024

I've added a pull request to fix this. #1964
The python changes caused all the problems.

@JohnRusk
Copy link
Member

@marcurdy I think the better long-term approach is to actually remove waagent and HandlerUtil rather than fix them. I noted some details here #1956. However, as a shorter-term solution, maybe the approach you suggest is better. I'm not sure.

@marcurdy
Copy link

I don't know the whole story on how it works without waagent nor the internal team's priority mission, but a short-term hotfix would be nice.

@anpct
Copy link

anpct commented Sep 5, 2024

Hi Team, any update on this issue, azure supports creating VMs with the Ubuntu 24.04 image but has not way of installing the monitoring agent, I would be nice if we could get at least a temporary fix for this issue quickly

@gilbahat
Copy link

gilbahat commented Sep 8, 2024

I've added a pull request to fix this. #1964 The python changes caused all the problems.

Hi @marcurdy it looks like MS won't look at your PR until you've signed their contributor license agreement
once you do, maybe they'll merge it and we'll all be free of this...

@SteveBurkettNZ
Copy link

Just to move the conversation forward, looks like the September release of the AMA for Linux (1.33.1) added support for Ubuntu 24.04 LTS.

@hAislt
Copy link

hAislt commented Nov 21, 2024

Just to move the conversation forward, looks like the September release of the AMA for Linux (1.33.1) added support for Ubuntu 24.04 LTS.

are you sure? I tried that a few weeks ago when it was released and still did not work.

@SteveBurkettNZ, I have tried it again and no it does not work.
I am using TF and I specified "1.33.1" as TypeHandler.
az vm extension image list --location shows that this version should exist.
When executing:
Error: compute.VirtualMachineExtensionsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="The value of parameter typeHandlerVersion is invalid." Target="typeHandlerVersion"
In the UI on a 22.04. Ubuntu it shows an update but using this typeHandlerVersion did also not work for 24.04.
Image

MS docs at its best mixed with TF docs.
So if anyone uses TF specify 1.33 this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests