canonical / canonical/cloud-init
timeout issue related to no network interfaces
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
# Bug report
Reported by a user on IRC.
> I'm booting up a VM with an Ubuntu image set up for cloud-init. I'm not able to modify the image at all pre-boot, but I do have full control over the user-data and other pieces that get passed to cloud-init, via an attached CIDATA drive. The problem is that this image is also configured such that cloud-init depends on systemd's wait-for-online service, and many of the VMs I'm spinning up have no NICs, and therefore will never be online. This causes all these VMs to sit for 2 minutes until the service times out, something I need them to not do. Is there some way I can get cloud-init-local to fix this for me?
>
> Since the timeout happens before the full cloud-init pass things like runcmd or bootcmd won't happen yet, so I can't just mask out the service. I've also tried setting my network config to 'disabled' but that didn't seem to change anything. Would really appreciate any tips or guidance here, as I'm out of ideas.
@TheRealFalcon suggested a potential workaround:
> you could try adding a network-config to your NoCloud image. You can see an example here (under the example): https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#example-meta-data
if you list a single interface with "optional: true", I'm wondering if that would work
## Steps to reproduce the problem
## Environment details
- Cloud-init version:
- Operating System Distribution:
- Cloud provider, platform or installer type:
## cloud-init logs
Contributor guide
Assessment
This issue has not been assessed yet.