← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1962150] [NEW] status symlink non-atomicity traceback with status --wait

 

Public bug reported:

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 <module>
 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.

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1962150

Title:
  status symlink non-atomicity traceback with status --wait

Status in cloud-init:
  New

Bug description:
  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 <module>
   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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1962150/+subscriptions



Follow ups