canonical / canonical/cloud-init
cloud-init analyze show - IndexError: pop from empty list
- 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: #1799511](https://bugs.launchpad.net/cloud-init/+bug/1799511)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2018-10-23T16:31:08.733994+00:00
date_fix_committed = None
date_fix_released = None
id = 1799511
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1799511
milestone = None
owner = philroche
owner_name = Philip Roche
private = False
status = confirmed
submitter = philroche
submitter_name = Philip Roche
tags = ['id-5baa9659e21d6e6664eaed37']
duplicates = []
_Launchpad user **Philip Roche(philroche)** wrote on 2018-10-23T16:31:08.733994+00:00_
When testing a new 18.10 minimal image on Azure I was gathering boot speed data and ran into the following error when trying to run `cloud-init analyze show` or `cloud-init analyze blame`. `cloud-init analyze dump` did not raise an exception.
The cloud-init version in use is cloud-init 18.4-7-g4652b196-0ubuntu1
'''
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 11, in
load_entry_point('cloud-init==18.4', 'console_scripts', 'cloud-init')()
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 904, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2519, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/analyze/__main__.py", line 104, in analyze_show
args.print_format)):
File "/usr/lib/python3/dist-packages/cloudinit/analyze/show.py", line 192, in show_events
return generate_records(events, print_format=print_format)
File "/usr/lib/python3/dist-packages/cloudinit/analyze/show.py", line 175, in generate_records
prev_evt = unprocessed.pop()
IndexError: pop from empty list
'''
I have attached the archive from `sudo cloud-init collect-logs`
Contributor guide
Research direction
Start in cloudinit/analyze/show.py at generate_records, where the traceback shows the empty-list pop, and reproduce with cloud-init analyze show or cloud-init analyze blame using the attached collected logs. Done means both commands process the reported data without raising IndexError, while analyze dump continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100