Azure / Azure/azure-linux-extensions
Extension settings (public as well as protected) are not getting populated on RHEL/CentOS 8.2
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
Extension 3.4 is getting installed successfully on the platform 8.0 and below and failure seen on 8.2. Below are logs from the system,
*Importing utils failed with error: Can't load waagent
Unable to initialize waagent log because of exception global name 'waagent' is not defined*
Info: SymantecCloudWorkloadProtection.SCWPAgentForLinux started to handle.
Error:
Error:
Error: Unable to load handler settings from /var/lib/waagent/Symantec.CloudWorkloadProtection.SCWPAgentForLinux-3.4.1.0/redhat-centos/8/config/0.settings
Error: Enable failed with error: local variable 'h_settings' referenced before assignment
Stacktrace: Traceback (most recent call last):
File "./scwpagent.py", line 76, in main
exit_code = operations[operation](hutil)
File "./scwpagent.py", line 182, in enable
public_settings, protected_settings = get_settings(hutil)
File "./scwpagent.py", line 437, in get_settings
if (h_settings.has_key('protectedSettings')
UnboundLocalError: local variable 'h_settings' referenced before assignment
Error: Enable failed with error: local variable 'h_settings' referenced before assignment
Stacktrace: Traceback (most recent call last):
File "./scwpagent.py", line 76, in main
exit_code = operations[operation](hutil)
File "./scwpagent.py", line 182, in enable
public_settings, protected_settings = get_settings(hutil)
File "./scwpagent.py", line 437, in get_settings
if (h_settings.has_key('protectedSettings')
UnboundLocalError: local variable 'h_settings' referenced before assignment
After looking at the logs, it seems to be an issue with the WAAgent as it is unable to populate the settings file which contains the customer credentials used during the enable phase. This is getting populated in case of 8.0
[root@RHEL8-001 Symantec.CloudWorkloadProtection.SCWPAgentForLinux-3.4.1.0]# ls config/
0.settings HandlerState HandlerStatus
Contributor guide
No contributing guide indexed for this repository
Research direction
The failure is in scwpagent.py, with enable calling get_settings at lines 182 and 437. Compare config/0.settings on platform 8.0 with the missing or unusable file on RHEL/CentOS 8.2, and investigate the WAAgent loading errors in the logs. Done means public and protected extension settings are populated and enable succeeds on 8.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, linux, python
- Domain
- cloud, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100