[Lunar/Desktop] 5 min boot delay on bare metal due cloud-init-local.service

Bug #2008727 reported by Carlos Nihelton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Critical
Unassigned

Bug Description

I run lunar for a while now (upgraded from Jammy through `do-release-upgrade -d`) and since I do some Subiquity development often, I do have cloud-init setup, for a while as well.
Friday 24th, after a regular `apt update && apt upgrade` my laptop boot time increased by surprising 5 min, at a first glance it appears to be due cloud-init-local.service waiting for network activity in the Ethernet port, which I rarely use.

Revision history for this message
Carlos Nihelton (cnihelton) wrote :
Revision history for this message
Brett Holman (holmanb) wrote :

Thanks for reporting this Carlos.

Current recommendation for users with cloud-init installed manually on their local desktop for development is to manually create /etc/cloud/cloud-init.disabled, which will prevent cloud-init from doing the local discovery that caused this delay.

Prior to cloud-init release 23.1, cloud-init was running, however no datasource was detected so you didn't experience this delay. With the addition of support for OpenStack baremetal[1], your system is being detected as a potential datasource for OpenStack, which caused the delay. If openstack ironic has some way of identifying itself to cloud-init, we might be able to improve cloud-init by eliminating this false positive, however from the docs I've read I haven't seen seen anything that we can use.

> at a first glance it appears to be due cloud-init-local.service waiting for network activity in the Ethernet port, which I rarely use.

Agreed, cloud-init used the first fallback device, which looks like was a wireless device on the more successful subsequent (15s) timeouts. I'm curious why the fallback device changed. To help us with this, would you mind also including dmesg output of this system just after boot with cloud-init installed?

[1] https://github.com/canonical/cloud-init/commit/02202954c65a7a1cdb9b28703bd0af01edd0e091

Brett Holman (holmanb)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Low
Brett Holman (holmanb)
Changed in cloud-init:
importance: Low → High
Revision history for this message
James Falcon (falcojr) wrote :

After much discussion, the upstream committers agree that the change represented in [1] (from the previous comment) is too impactful to existing workloads and are working on an alternative solution.

Changed in cloud-init:
importance: High → Critical
description: updated
Revision history for this message
Carlos Nihelton (cnihelton) wrote :

@holmanb, here is a dmesg log after re-enabling cloud-init on the same laptop.

Revision history for this message
Chad Smith (chad.smith) wrote :

Upstream commit landed to avoid this automatically suggesting that OpenStack datasource may be applicable by default on Bare metal. This is probably not the majority of cases for bare metal openstack detection for bare metal should only be active if it is explicitly set by either kernel cmdline by providing ci.ds=OpenStack parameter or in the image itself with a file in /etc/cloud/cloud.cfg.d/90-somename.cfg containing a explicitly:
datasource_list: [OpenStack].

Related upstream commit. https://github.com/canonical/cloud-init/commit/d1ffbea556a06105d1ade88b4143ad43f53692c4

This is released to Lunar now as 23.1.1 and will make it back to Bionic, Focal, Jammy, Kinetic in our next SRU in a week or two.

summary: - [Lunar/Desktop] 5 min boot delay due cloud-init-local.service
+ [Lunar/Desktop] 5 min boot delay on bare metal due cloud-init-
+ local.service
Changed in cloud-init:
status: Triaged → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote :

This also impacted lunar live installer per LP: #2008727. Both should be resolved in latest daily lunar builds w/ version 23.1.1

Revision history for this message
James Falcon (falcojr) wrote :
Revision history for this message
Chad Smith (chad.smith) wrote :

This bug is believed to be fixed in cloud-init in version 23.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.