Public bug reported:

[ Impact ]

Cloud-init immediately reconfigures the network when 1) hotplug is
enabled and 2) a new device is added. AWS IMDS might not (yet) have the
interface configuration available by the time that the device is visible
to the instance. This means that new interfaces are sometimes left in a
partially-configured state by cloud-init.

Since AWS provides no synchronization mechanism to guarantee that
configuration is available, the fix is to retry periodically for 30s and
apply any new configurations that arrive.

[ Test Plan ]

This issue is reproducible using the cloud-init test framework using a
specific instance type. The following test typically fails within a few
runs (~15m):

```
while CLOUD_INIT_PLATFORM="ec2" CLOUD_INIT_INSTANCE_TYPE="m6in.32xlarge" 
CLOUD_INIT_OS_IMAGE="noble" CLOUD_INIT_CLOUD_INIT_SOURCE="./cloud-init_all.deb" 
tox -e integration-tests -- --pdb 
tests/integration_tests/modules/test_hotplug.py::test_multi_nic_hotplug_vpc; do 
echo "again"; done
```

Running the above for a few hours would give us high confidence that the
issue is resolved.

[ Where problems could occur ]

This change is limited to the AWS datasource, so accidentally unintended
side-effects should be relatively well-contained to hotplug users on
AWS.

[ Other Info ]

https://github.com/canonical/cloud-init/issues/5373
https://github.com/canonical/cloud-init/pull/5995

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  cloud-init hotplug fails when AWS metadata is unavailable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2097319/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to