Azure / Azure/azure-linux-extensions
Linux Diagnostic Agent Install Fails with "ERROR:NameError: global name 'waagent_ext_event_type' is not defined"
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
These errors appear in the `/var/log/azure/Microsoft.Azure.Diagnostics.LinuxDiagnostic/extension.log`:
```log
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] RunCmd sh /opt/microsoft/omsagent/bin/configure_syslog.sh configure LAD 25229
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] Return 0:Configuring rsyslog for OMS logging
Restarting service: rsyslog
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] RunCmd sh /opt/microsoft/omsagent/bin/configure_syslog.sh restart LAD
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] Return 0:Restarting service: rsyslog
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] RunCmd /opt/microsoft/omsagent/bin/service_control restart LAD
ERROR:CalledProcessError. Error Code is 1
ERROR:CalledProcessError. Command string was /opt/microsoft/omsagent/bin/service_control restart LAD
ERROR:CalledProcessError. Command result was INFO: Configuring OMS agent service LAD ...
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] Return 1:INFO: Configuring OMS agent service LAD ...
ERROR:[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] Failed to perform extension operation Install with error:global name 'waagent_ext_event_type' is not defined, Traceback (most recent call last):
ERROR: File "/var/lib/waagent/Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125/diagnostic.py", line 300, in main
ERROR: g_lad_log_helper.report_mdsd_dependency_setup_failure(waagent_ext_event_type, dependencies_msg)
ERROR:NameError: global name 'waagent_ext_event_type' is not defined
ERROR:
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] Install,error,0,Extension operation Install failed:global name 'waagent_ext_event_type' is not defined
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] sequence number is 0
```
The lines:
```
[Microsoft.Azure.Diagnostics.LinuxDiagnostic-3.0.125] RunCmd /opt/microsoft/omsagent/bin/service_control restart LAD
ERROR:CalledProcessError. Error Code is 1
```
suggested some issue with the LAD service. An inspection of `/opt/microsoft/omsagent/bin/service_control` showed that it seemed to be attempting a service restart yet a check of the omsagent-LAD service showed that it had been running since many hours before the agent reinstalls.
Once that service was manually shut down, the agent could be removed and installed successfully from the Azure Portal. This was not an obvious solution so the issue is that there could be some improved error reporting or self-resolution attempted as part of that restart process.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.