Azure / Azure/azure-linux-extensions

agent.py - The VM doesn't have systemctl - Ubuntu 20.04

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

Description

Still can't update on Ubuntu 20.04. Can you please fix this. The system obviously **does** have systemctl. Also maybe run some automated build tests on each operating system you say you support please. Only change to this Azure Ubuntu 20.04 image is we ran "apt install python-is-python2" to get it to install initially. Below is the result of the update agent command run from Azure Monitor:

```
2021-10-06 19:36:46,416 - root - INFO - vmGuestHealthAgent write_status_json_and_exit() started for : Install
2021-10-06 19:36:46,416 - root - INFO - vmGuestHealthAgent write_status_json_and_exit() succeeded for : Install
2021-10-06 22:13:06,862 - root - INFO - FileLogger initialized successfully, logging will be at /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log
2021-10-06 22:13:06,862 - root - INFO - ---start of dumping the buffer of logs that were printed prior to /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log creation----
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Successfully created ConsoleLogger
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Starting to parse the HandlerEnvironment
2021-10-06 22:13:06,863 - root - INFO - 2021-10-06 22:13:06: INFO: Successfully parsed the HandlerEnvironment, got the following log_path : /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent
2021-10-06 22:13:06,863 - root - INFO - ---end of dumping the buffer of logs that were printed prior to /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log creation----
2021-10-06 22:13:06,868 - root - ERROR - The VM doesn't have systemctl
2021-10-06 22:13:06,870 - root - ERROR - Unsupported Operating System. OS distribution: Ubuntu OS Version: 20.04
For details, check logs in /var/log/vmGuestHealthAgent.log
```

Azure deployment log if you're interested:

```
{
"status": "Failed",
"error": {
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionHandlerNonTransientError\",\r\n \"message\": \"The handler for VM extension type 'Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent' has reported terminal failure for VM extension 'GuestHealthLinuxAgent' with error message: '[ExtensionOperationError] Non-zero exit code: 178, /var/lib/waagent/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent-1.0.41/./scripts/install.py\\n[stdout]\\nInitializing Logger in logger.py\\n2021-10-07 22:18:33: INFO: Successfully created ConsoleLogger\\n2021-10-07 22:18:33: INFO: Starting to parse the HandlerEnvironment\\n2021-10-07 22:18:33: INFO: Successfully parsed the HandlerEnvironment, got the following log_path : /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent\\n2021-10-07 22:18:33: INFO: Logging will continue at /var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent/vmGuestHealthAgent.log\\n\\n\\n[stderr]\\nRunning scope as unit: Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent_1.0.41_[REDACTED].scope\\n'.\\r\\n \\r\\n'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'\"\r\n }\r\n ]\r\n }\r\n}"
}
]
}
}
```

Output of pidof command run manually:

```
root@[REDACTED]:/var/lib/waagent/Microsoft.Azure.Monitor.VirtualMachines.GuestHealth.GuestHealthLinuxAgent-1.0.41/scripts# pidof systemd
627878
```

Also see related issue regarding Unsupported Operating System and missing Ubuntu 20 in constants.py: #1444

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.