← Back to team overview

cloud-init team mailing list archive

Looking for advice on cloud-init problem starting new Ubuntu 24 Openstack instance

 

Lately I'm experiencing some occasional issues connecting via ssh to Ubuntu 24 Openstack instances and could use some ideas about how to correct the behavior so there are no connection issues.  We get images from https://cloud-images.ubuntu.com/noble/ (such as https://cloud-images.ubuntu.com/noble/20250226/noble-server-cloudimg-amd64.img).  The problems happen about 25-33% of the time and seem to be related to getting the metadata to retrieve the public key to put in ~ubuntu/.ssh/authorized_keys.  I first noticed an issue on 2025-02-22 in some tooling of my team. There are a couple of different symptoms I've seen:

Symptoms 1
I believe the log is taken from an instance created with the 20250226 image.
ssh behavior
Permission denied (publickey)
Note: I didn't record a complete error message
Log events from Openstack console
[    4.424302] cloud-init[640]: Cloud-init v. 24.4-0ubuntu1~24.04.2 running 'init-local' at Thu, 27 Feb 2025 18:54:14 +0000. Up 4.41 seconds.
[    6.206522] cloud-init[640]: 2025-02-27 18:54:16,207 - url_helper.py[ERROR]: Timed out, no response from urls: ['http://[fe80::a9fe:a9fe%25ens3]/openstack', 'http://169.254.169.254/openstack']
[    6.211260] cloud-init[640]: 2025-02-27 18:54:16,212 - log_util.py[WARNING]: No active metadata service found
.
.
.
[   12.441227] cloud-init[1120]: Cloud-init v. 24.4-0ubuntu1~24.04.2 running 'modules:final' at Thu, 27 Feb 2025 18:54:22 +0000. Up 12.42 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.

Symptoms 2
The log is taken from an instance created with the 20250304 image.
ssh behavior
ssh: connect to host pfuntner-ubuntu24-20250304-3-5 port 22: Connection refused
Log events from Openstack console
[    4.863606] cloud-init[600]: Cloud-init v. 24.4.1-0ubuntu0~24.04.1 running 'init-local' at Wed, 05 Mar 2025 12:17:19 +0000. Up 4.85 seconds.
[    6.691475] cloud-init[600]: 2025-03-05 12:17:21,715 - url_helper.py[WARNING]: Ec2 IMDS endpoint returned a 503 error. HTTP endpoint is overloaded. Retrying.
[    7.694753] cloud-init[600]: 2025-03-05 12:17:22,718 - url_helper.py[WARNING]: Ec2 IMDS endpoint returned a 503 error. HTTP endpoint is overloaded. Retrying.

The warning message is repeated every second.  I left one instance up and it's been retrying for over 20 minutes and doesn't get further in the boot.

I opened https://github.com/canonical/cloud-init/issues/6062 with some complete logs but I don't think anyone has looked at it.

Our Openstack admin team basically said we're on our own since we're importing images rather than the images they provide (they don't provide Ubuntu 24 yet).  I don't know if there's a bug in Openstack, cloud-init or something else.  Does anyone have any advice?