Azure: issues with accelerated networking on Hirsute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
New
|
Undecided
|
Unassigned |
Bug Description
[General]
On Azure, when provisioning a Hirsute VM with Accelerated Networking enabled, sometimes part of the cloud-init configuration is not applied.
Especially, in those cases, the public SSH key is not setup properly.
[how to reproduce]
Start a VM with AN enabled:
```
az vm create --name "$VM_NAME --resource-group "$GROUP" --location "UK South" --image 'Canonical:
```
After a moment, try to SSH: if you succeed, delete and recreate a new VM.
[troubleshooting]
To be able to connect into the VM, run:
az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
```
In "/run/cloud-
```
"publicKeys": [
{
"keyData": "<my-pub-key>",
"path": "/home/
}
],
```
as expected.
[workaround]
As mentioned, Azure allows the user to run command into the VM without SSH connection. To do so, one can use the Azure CLI:
az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
This example uses "ssh-import-id" but it's also possible to just echo a given public key into /home/ubuntu/
NOTE: this will only solves the SSH issue, I do not know if this bug affects other things. If so the user would have to apply those things manually.
Changed in cloud-init (Ubuntu): | |
milestone: | none → ubuntu-21.04 |
tags: | added: rls-hh-incoming |
Changed in linux-azure (Ubuntu): | |
milestone: | none → ubuntu-21.04 |
description: | updated |
description: | updated |
Changed in cloud-init (Ubuntu): | |
status: | New → Incomplete |
Changed in cloud-init (Ubuntu): | |
milestone: | ubuntu-21.04 → hirsute-updates |
Changed in linux-azure (Ubuntu): | |
milestone: | ubuntu-21.04 → hirsute-updates |
tags: | added: fr-1324 |
tags: | removed: rls-hh-incoming |
Changed in systemd (Ubuntu): | |
status: | Incomplete → Fix Released |
Changed in linux-azure (Ubuntu Hirsute): | |
status: | New → Invalid |
Changed in cloud-init (Ubuntu Hirsute): | |
status: | New → Incomplete |
no longer affects: | linux-azure (Ubuntu) |
no longer affects: | linux-azure (Ubuntu Hirsute) |
no longer affects: | cloud-init (Ubuntu Hirsute) |
no longer affects: | cloud-init (Ubuntu) |
affects: | cloud-init → ubuntu-translations |
no longer affects: | ubuntu-translations |
Hi Gauthier,
There are a few lines in the attached logs tarball (thanks attaching it) that make us suspect that networking is more generally broken when the issue you describe happens, e.g.:
azure.py[ERROR]: Failed to read /var/lib/ dhcp/dhclient. eth0.leases: [Errno 2] No such file or directory: '/var/lib/ dhcp/dhclient. eth0.leases'
Without networking it is to be expected that cloud-init fails to complete the instance configuration, and there's little cloud-init can do. A full networking setup failure could be caused by a kernel issue with the accelerated networking feature. Could you please dig a bit deeper into a failing instance and see if the networking is actually working and that everything is fine with the kernel? Thanks!