systemd service dependency loop between cloud-init, NetworkManager and dbus
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| OEM Priority Project |
Incomplete
|
Critical
|
Unassigned | ||
| cloud-init (Ubuntu) |
Fix Released
|
Critical
|
Alberto Contreras | ||
| Noble |
Fix Released
|
Undecided
|
Unassigned | ||
| livecd-rootfs (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
| Noble |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
[ Impact ]
cloud-init 24.2 shifted the systemd configuration of cloud-init-
The affected systemd ordering cycle messages are visible in journalctl -b 0 in either Desktop ephemeral boot or first boot post-installation.
It may result in either cloud-init-
Without this changeset, Ubuntu Live Desktop launches of ephemeral boot (or first boot after install) can see "ordering cycle" messages in journalctl -b 0 which leads systemd to kick outany of the following potential conflicting services:
- cloud-init-
- NetworkManager.
- dbus.service
[ Test Plan ]
Validate both desktop and server images do not expose systemd ordering cycle issues related to hotplug
== Test case 1 (desktop) ==
Download daily noble desktop live image from https:/
1.Launch in virt-manager or qemu-kvm.
2. Bring up a gnome terminal during ephemeral boot before responding to any configuration prompts Alt-Ctrl-T
3. Confirm ordering cycle issues: journalctl -b 0 | grep "ordering cycle"
4. Shutdown daily failing image
5. Follow https:/
6. Launch in virt-manager or qemu-kvm
7. Confirm ordering cycle is resolved: journalctl -b 0 | grep "ordering cycle"
8. Confirm all affected services are healthy
for service_name in NetworkManager.
systemctl status $service_name
done
9. Complete live installer prompts and reboot into "first boot"
10. Login and confirm no ordering cycles on first boot: Atl-Ctrl-T: journalctl -b 0 | grep "ordering cycle"
11. Assert previously affected services are healthy:
for service_name in NetworkManager.
systemctl status $service_name
done
12. Assert cloud-init is healthy: cloud-init status --format=yaml
== Test case 2 (server) broad integration test coverage ==
1. Run full suite of cloud-init integration tests using the ppa:cloud-
CLOUD_INIT_
CLOUD_INIT_
2. Run hotplug specific integration tests against ec2 and azure
CLOUD_INIT_
CLOUD_INIT_
3. validate no negative impacts to boot speed
Leverage https:/
[ Where problems can occur ]
* This upload is a direct resolution of where problems could occur. If there are systemd ordering cycles introduced by new systemd units or services, systemd may punt conflicting services out of boot goals for the system. If critical services are deleted from boot goals, the system, and affected services will not be brought up and configured as anticipated. This leads to misconfigured, unconfigured or inaccessible systems. The good news is that the symptom of systemd ordering cycles is easily detected during systemd generator timeframe and systemd leaves logs in journalctl about any affected services when this occurs.
[ Other Info ]
This bug in systemd ordering was not seen in Oracular Live images originally because of a separate bug: https:/
[ Original Description ]
We got errors that some services like snapd and NetworkManager is not started when running cloud-init or desktop, excerpt from journal below:
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Sep 13 12:37:41 localhost.
Related logs and service files are attached in sosreport.
Internal reference: NANTOU-473
| summary: |
- systemd service dependency loop between cloud-init, NetworkManager an + systemd service dependency loop between cloud-init, NetworkManager and dbus |
| tags: | added: jira-somerville-1010 |
| tags: | added: jira-nantou-473 |
| tags: | added: jira-stella-191 |
| Changed in cloud-init (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in cloud-init (Ubuntu): | |
| assignee: | nobody → Alberto Contreras (aciba) |
| description: | updated |
| description: | updated |
| description: | updated |
| description: | updated |
| description: | updated |
| Changed in oem-priority: | |
| status: | New → Incomplete |

The cloud-init.service file is provided by livecd-rootfs, but we aren't sure what triggered this issue.