This bug was originally filed in Launchpad as LP: #1962150
Launchpad details
affected_projects = []
assignee = adam-collard
assignee_name = Adam Collard
date_closed = 2023-03-23T20:18:11.072810+00:00
date_created = 2022-02-24T08:49:19.873990+00:00
date_fix_committed = 2022-04-08T20:41:43.544099+00:00
date_fix_released = 2023-03-23T20:18:11.072810+00:00
id = 1962150
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1962150
milestone = None
owner = adam-collard
owner_name = Adam Collard
private = False
status = fix_released
submitter = adam-collard
submitter_name = Adam Collard
tags = []
duplicates = []
Launchpad user Adam Collard(adam-collard) wrote on 2022-02-24T08:49:19.873990+00:00
MAAS run system-tests on a regular basis using LXD containers to set things up.
A recent run failed waiting for the LXD container to finish booting, with a traceback from cloud-init.
After launching the container, the script runs timeout 2000 cloud-init status --wait --long to ensure that the commands we pass through as user-data are complete.
Here's a redacted snippet from the logs
2022-02-23 17:21:00 INFO : Waiting for boot to finish...
2022-02-23 17:21:00 INFO timeout 2000 cloud-init status --wait --long
2022-02-23 17:21:04 INFO ..........
2022-02-23 17:21:04 INFO Traceback (most recent call last):
2022-02-23 17:21:04 INFO File "/usr/bin/cloud-init", line 11, in
2022-02-23 17:21:04 INFO load_entry_point('cloud-init==21.4', 'console_scripts', 'cloud-init')()
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 927, in main
2022-02-23 17:21:04 INFO retval = util.log_time(
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2472, in log_time
2022-02-23 17:21:04 INFO ret = func(*args, **kwargs)
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 60, in handle_status_args
2022-02-23 17:21:04 INFO status, status_detail, time = _get_status_details(init.paths)
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 123, in _get_status_details
2022-02-23 17:21:04 INFO status_v1 = load_json(load_file(status_file)).get('v1', {})
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1361, in load_file
2022-02-23 17:21:04 INFO with open(fname, 'rb') as ifh:
2022-02-23 17:21:04 INFO FileNotFoundError: [Errno 2] No such file or directory: '/run/cloud-init/status.json'
You can see from the ... that there are a few successful attempts to wait, but then it fails.
This bug was originally filed in Launchpad as LP: #1962150
Launchpad details
Launchpad user Adam Collard(adam-collard) wrote on 2022-02-24T08:49:19.873990+00:00
MAAS run system-tests on a regular basis using LXD containers to set things up.
A recent run failed waiting for the LXD container to finish booting, with a traceback from cloud-init.
After launching the container, the script runs
timeout 2000 cloud-init status --wait --longto ensure that the commands we pass through as user-data are complete.Here's a redacted snippet from the logs
2022-02-23 17:21:00 INFO : Waiting for boot to finish...
2022-02-23 17:21:00 INFO timeout 2000 cloud-init status --wait --long
2022-02-23 17:21:04 INFO ..........
2022-02-23 17:21:04 INFO Traceback (most recent call last):
2022-02-23 17:21:04 INFO File "/usr/bin/cloud-init", line 11, in
2022-02-23 17:21:04 INFO load_entry_point('cloud-init==21.4', 'console_scripts', 'cloud-init')()
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 927, in main
2022-02-23 17:21:04 INFO retval = util.log_time(
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2472, in log_time
2022-02-23 17:21:04 INFO ret = func(*args, **kwargs)
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 60, in handle_status_args
2022-02-23 17:21:04 INFO status, status_detail, time = _get_status_details(init.paths)
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 123, in _get_status_details
2022-02-23 17:21:04 INFO status_v1 = load_json(load_file(status_file)).get('v1', {})
2022-02-23 17:21:04 INFO File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1361, in load_file
2022-02-23 17:21:04 INFO with open(fname, 'rb') as ifh:
2022-02-23 17:21:04 INFO FileNotFoundError: [Errno 2] No such file or directory: '/run/cloud-init/status.json'
You can see from the ... that there are a few successful attempts to wait, but then it fails.