cloud-net fails when DHCP slow
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| cloud-init (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
| subiquity (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
During a cloud-init autoinstall with Ubunutu Focal Server 20.04, the attempts to retrieve the meta-data file fail immediately with no timeout as indicated in the cloud-init.log. According to the system logs, the network does not receive an IP address until after the attempt to retrieve the meta-data file. The DHCP in the facility is known to be a little slow.
It is possible to retrieve the file by switching to a second virtual terminal and downloading it with wget (after the failure of the cloud-init). It appears that the url_helper.py function reporting the failure to retrieve the files does not wait for any timeout period when the network is not yet present.
Possible solution? Adding a check with a timeout of a few seconds for the network being available before moving to download the meta-data and user-data files.

This looks like cloud-init handling to me, cloud-init folks please send it right back if you believe otherwise.