cloud-init status --wait never returns if datasource not found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
James Falcon | ||
cloud-init (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
* In environments where cloud-init-
This upload ensures that the expected artifact of cloud-init-
[Test Plan]
* this scenario is reproducible by disabling LXD nocloud metadata templates and security.
Procedure
* lxc launch ubuntu-
# To avoid LXD datasource detection don't allow /dev/lxd/sock in instance
* lxc config set test-<series< security.
# Remove nocloud-net cloud-init instance metadata to avoid NoCloud
* lxc exec test-<series> -- rm -rf /var/lib/
# clean reboot of cloud-init to ensure generator detection
* lxc exec test-<series> -- cloud-init clean --logs --reboot
# make sure cloud-init status --wait doesn't block indefiinitely in this case
* lxc exec tests-<series> -- cloud-init status --wait
This test procedure is captured by cloud-init integration test
https:/
It can be run with the following:
for $SERIES in bionic focal impish; do
CLOUD_
done
[Where problems could occur]
* Problems can occur if cloud-init early exits from `cloud-init status --wait` without blocking if 3rd party apps/scripts which expect to block until cloud-init completes start running before cloud-init is "done" could could lead to unexpected system configuration or apt-lock issues if scripts attempt to install packages
[Other Info]
[Original Description]
Calling "cloud-init status --wait" never returns if ds-identify cannot find a datasource.
In https:/
A simple reproduction is to change "ret=1" on this line:
https:/
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
description: | updated |
tags: | added: regression-update |
Changed in cloud-init (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Focal): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Impish): | |
status: | New → In Progress |
Changed in cloud-init (Ubuntu Jammy): | |
status: | Triaged → In Progress |
Changed in cloud-init: | |
assignee: | nobody → James Falcon (falcojr) |
Changed in cloud-init: | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Upstream fix for this posted to https:/ /github. com/canonical/ cloud-init/ pull/1349