Azure / Azure/azure-linux-extensions

[ADE] ImportError: Can't load waagent

Open
#1,216 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

I am getting an error when trying to encrypt disks on a Redhat 8.2 VM.

## Info
```
# waagent --version
WALinuxAgent-2.2.46 running on redhat 8.2
Python: 3.6.8
Goal state agent: 2.2.52
```
## Error
```
[ExtensionOperationError] Non-zero exit code: 1, /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.52/extension_shim.sh -c main/handle.py --install
[stdout]
Python 2.7.17
Traceback (most recent call last):
File "main/handle.py", line 32, in
from Utils import HandlerUtil
File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.52/main/Utils/HandlerUtil.py", line 71, in
from Utils.WAAgentUtil import waagent
File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.52/main/Utils/WAAgentUtil.py", line 41, in
waagent = imp.load_source('waagent', agentPath)
File "/usr/sbin/waagent", line 46, in
raise ImportError("Can't load waagent")
ImportError: Can't load waagent
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ADE extension entry point main/handle.py and trace its imports through Utils/HandlerUtil.py and Utils/WAAgentUtil.py to the /usr/sbin/waagent path shown in the traceback. Reproduce the install on the stated Red Hat 8.2 and Python versions and establish a confirmed fix for the ImportError; done means the extension install no longer exits with code 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.