analyze return multiple bootRecords for single real boot

Bug #1930956 reported by Haitao Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

cloud-init analyze show return me multiple boot records, while I just have 1.

- CloudProvider is Azure
- default (I didn't tune anything)
- attached

Tags: analyze azure
Revision history for this message
Haitao Chen (haidaocht) wrote :
tags: added: analyze
tags: added: azure
Revision history for this message
Haitao Chen (haidaocht) wrote (last edit ):

/cloudinit/analyze/show.py
```
        if event_type(event) == 'start':
            if event.get('name') in stages_seen:
```

if a event name is repeated (start and finish multiple times).

and it's not finished right away(child event will break this condition), finish the event right away won't push the event to stages_seen.

then its considered as new boot record.

Revision history for this message
Chad Smith (chad.smith) wrote :

Haitao Chen (haidaocht), thank you for the bug and contributing to cloud-init to make it better. Do you happen to have a system available to attach the `sudo cloud-init analyze show` output as well?

Much thanks.

Revision history for this message
Chad Smith (chad.smith) wrote :
Download full text (9.8 KiB)

Nevermind, just grabbed it on a Xenial instance I had available: This does feel like a general bug that needs to be better handled by analyze show output for certain event types on Azure.

-- Boot Record 01 --
The total time elapsed since completing an event is printed after the "@" character.
The time the event takes is printed after the "+" character.

Starting stage: init-local
|`->no cache found @00.00400s +00.00100s
Starting stage: init-local/search-Azure
Starting stage: azure-ds/_get_data
|`->found azure asset tag @00.03100s +00.00100s
|`->get_boot_telemetry @00.03200s +00.01200s
|`->get_system_info @00.04500s +00.00000s
Starting stage: azure-ds/crawl_metadata
|`->list_possible_azure_ds_devs @00.04500s +00.33100s
|`->load_azure_ds_dir @00.37700s +00.00000s
Starting stage: azure-ds/load_azure_ds_dir
Starting stage: azure-ds/read_azure_ovf
|`->load_azure_ovf_pubkeys @00.38300s +00.00000s
Starting stage: azure-ds/_get_preprovisioning_cfgs
|`->_get_preprovisionedvm_cfg_value @00.38300s +00.00100s
|`->_get_preprovisionedvmtype_cfg_value @00.38400s +00.00000s
Finished stage: (azure-ds/_get_preprovisioning_cfgs) 00.00100 seconds

Finished stage: (azure-ds/read_azure_ovf) 00.00600 seconds

Finished stage: (azure-ds/load_azure_ds_dir) 00.00700 seconds

Starting stage: azure-ds/get_imds_data_with_api_fallback
Starting stage: azure-ds/get_metadata_from_imds
|`->obtain dhcp lease @00.39400s +00.08700s
|`->_get_metadata_from_imds @00.48200s +00.01400s
Finished stage: (azure-ds/get_metadata_from_imds) 00.12800 seconds

Finished stage: (azure-ds/get_imds_data_with_api_fallback) 00.12900 seconds

|`->_get_random_seed @00.52200s +00.00000s
Finished stage: (azure-ds/crawl_metadata) 00.47700 seconds

|`->write_files @00.52300s +00.00300s
Finished stage: (azure-ds/_get_data) 00.49500 seconds

|`->get_public_ssh_keys @00.52700s +00.00000s
Finished stage: (init-local/search-Azure) 00.50200 seconds

Starting stage: azure-ds/parse_network_config
|`->_generate_network_config_from_fallback_config @00.59400s +00.00600s
Finished stage: (azure-ds/parse_network_config) 00.00600 seconds

Finished stage: (init-local) 00.61900 seconds

Starting stage: init-network
|`->restored from cache with run check: DataSourceAzure [seed=/var/lib/waagent] @01.56200s +00.02200s
Total Time: 2.37000 seconds

-- Boot Record 02 --
The total time elapsed since completing an event is printed after the "@" character.
The time the event takes is printed after the "+" character.

Starting stage: azure-ds/parse_network_config
|`->_generate_network_config_from_fallback_config @00.00000s +00.00500s
Finished stage: (azure-ds/parse_network_config) 00.00500 seconds

Starting stage: init-network/setup-datasource
Starting stage: azure-ds/setup
Starting stage: azure-ds/_negotiate
Starting stage: azure-ds/bounce_network_with_azure_hostname
|`->temporary_hostname @00.01500s +00.00100s
Finished stage: (azure-ds/bounce_network_with_azure_hostname) 00.00300 seconds

Starting stage: azure-ds/get_metadata_from_fabric
Starting stage: azure-ds/register_with_azure_and_fetch_data
|`->generate_certificate @00.01900s +01.48600s
Starting stage: azure-ds/_fetch_goal_state_from_azure
Starting stage: azure-ds/_ge...

Chad Smith (chad.smith)
Changed in cloud-init:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.