canonical / canonical/cloud-init
Netplan/Systemd/Cloud-init/Dbus Race
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 22
Description
This bug was originally filed in Launchpad as [LP: #1997124](https://bugs.launchpad.net/cloud-init/+bug/1997124)
Launchpad details
affected_projects = ['netplan', 'systemd (Ubuntu)']
assignee = falcojr
assignee_name = James Falcon
date_closed = None
date_created = 2022-11-18T23:07:12.002484+00:00
date_fix_committed = None
date_fix_released = None
id = 1997124
importance = high
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1997124
milestone = None
owner = holmanb
owner_name = Brett Holman
private = False
status = in_progress
submitter = holmanb
submitter_name = Brett Holman
tags = []
duplicates = []
_Launchpad user **Brett Holman(holmanb)** wrote on 2022-11-18T23:07:12.002484+00:00_
Cloud-init is seeing intermittent failures while running `netplan apply`, which appears to be caused by a missing resource at the time of call.
The symptom in cloud-init logs looks like:
Running ['netplan', 'apply'] resulted in stderr output: Failed to connect system bus: No such file or directory
I think that this error[1] is likely caused by cloud-init running netplan apply too early in boot process (before dbus is active).
Today I stumbled upon this error which was hit in MAAS[2]. We have also hit it intermittently during tests (we didn't have a reproducer).
Realizing that this may not be a cloud-init error, but possibly a dependency bug between dbus/systemd we decided to file this bug for broader visibility to other projects.
I will follow up this initial report with some comments from our discussion earlier.
[1] https://github.com/canonical/netplan/blob/main/src/dbus.c#L801
[2] https://discourse.maas.io/t/latest-ubuntu-20-04-image-causing-netplan-error/5970
Contributor guide
Research direction
Start with the cloud-init path that runs `netplan apply`, then inspect the referenced `netplan/src/dbus.c` location and the reported `Failed to connect system bus` log output. Determine the dependency or boot-order cause of the intermittent failure and confirm completion with a reproducible test or failure-free run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100