Public bug reported:

====== [Bug Description] ======

On Ubuntu 24.04 Minimal EC2 AMIs, cloud-init may fail to retrieve EC2
metadata and userdata on the first boot for certain instance types
(notably hpc7a.*, every time on hpc7a.96xlarge). This results in SSH
keys from user-data not being applied and prevents SSH access until the
instance is rebooted.

The issue appears to be caused by a race condition where no eligible
network interfaces are present during the init-local stage when the EC2
datasource attempts metadata discovery.


====== [Reproducer] ====== 

1. Launch an Ubuntu 24.04 Noble Minimal EC2 AMI

2. Use an EC2 instance type where network interfaces may not be immediately 
available at early boot (e.g. 
   hpc7a.96xlarge reproduces consistently)

3. Wait several minutes after the instance reaches running, then attempt
to SSH into the instance

You will see this error: ubuntu@<public-ip>: Permission denied
(publickey).

If you access the machine through the AWS console, you will see the following 
cloud-init errors:
 * Unable to get metadata
 * The instance must have at least one eligible NIC

====== [Environment Details] ======

* Cloud-init version: cloud-init 25.2-0ubuntu1~24.04.1
* Operating System Distribution: Ubuntu 24.04 LTS (Noble) Minimal AMI
* Cloud provider: Amazon EC2, hpc7a.* (notably hpc7a.96xlarge) instances
* Kernel: linux-image-6.14.0-1018-aws


====== [Suggested Fixes] ====== 

Include the `ENA_ETHERNET` driver as a built-in module in the noble
generic kernel.

====== [Related Links] ======

cloud-init bug: https://github.com/canonical/cloud-init/issues/6697

** Affects: linux-aws (Ubuntu)
     Importance: Undecided
     Assignee: Leah Goldberg (goldberl)
         Status: New

** Changed in: linux-aws (Ubuntu)
     Assignee: (unassigned) => Leah Goldberg (goldberl)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2144692

Title:
  Network interfaces not available early in boot on hpc7a instances,
  causing EC2 metadata failures

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-aws/+bug/2144692/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to