status: races with dbus and errors out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Won't Fix
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
`cloud-init status` checks systemctl to ensure the reported status is accurate. However, systemctl can fail if dbus isn't yet ready, and those exceptions are not handled in cloud-init.
[Test Case]
Note that cloud-init developers have been unable to reproduce the problem. To simulate the issue, create a script that errors anytime "systemctl show" is used, but passes through to the real "systemctl" for any other commands used by cloud-init. Example script (here the real "systemctl" has been renamed to "systemctl2"):
#!/bin/bash
# Check if the first argument is 'show'
if [ "$1" == "show" ]; then
echo "'show' not allowed"
exit 1
fi
/usr/bin/systemctl2 "$@"
Then, with this script being used:
1. Ensure `cloud-init status --wait` exits successfully when cloud-init has finished running with no errors.
2. Edit "/run/cloud-
3. Edit "/run/cloud-
[Regression Potential]
Given that this relates only to the "cloud-init status" command, the regression potential is fairly limited. It's possible a script blocking on "cloud-init status --wait" could exit early or that a "cloud-init status" command will run forever. Either case wouldn't be more than an inconvenience that can be easily worked around.
[Other Info]
Upstream bug: https:/
Upstream commit: https:/
description: | updated |
description: | updated |
Changed in cloud-init (Ubuntu Lunar): | |
status: | New → Won't Fix |
Changed in cloud-init (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in cloud-init (Ubuntu Focal): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Mantic): | |
status: | New → In Progress |
tags: |
added: verification-done verification-done-focal verification-done-jammy verification-done-mantic removed: verification-needed verification-needed-focal verification-needed-jammy verification-needed-mantic |
Published to Ubuntu Noble: cloud-init 24.1~3gb729a4c4 -0ubuntu1 (Accepted)