cloud-init analyze output not formatted cleanly on Azure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
Azure added additional reporting trace points, the result is that analyze/blame output doesn't look well formatted.
-- 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.00500s +00.00000s
Starting stage: init-local/
Starting stage: azure-ds/_get_data
|`->found azure asset tag @00.05000s +00.01100s
Starting stage: azure-ds/
|`->list_
|`->load_
Starting stage: azure-ds/
Starting stage: azure-ds/
|`->load_
|`->_extract_
Finished stage: (azure-
Finished stage: (azure-
Starting stage: azure-ds/
|`->_get_
Finished stage: (azure-
|`->_get_
Finished stage: (azure-
|`->maybe_
|`->write_files @00.53300s +00.00300s
Finished stage: (azure-
Finished stage: (init-local/
|`->network config from imds @00.59600s +00.00000s
Finished stage: (init-local) 00.73800 seconds
Starting stage: init-network
|`->restored from cache with run check: DataSourceAzure [seed=/
|`->network config from imds @03.21700s +00.00100s
Starting stage: init-network/
Starting stage: azure-ds/setup
Starting stage: azure-ds/_negotiate
Starting stage: azure-ds/
|`->temporary_
Finished stage: (azure-
Starting stage: azure-ds/
Starting stage: azure-ds/
|`->generate_
Starting stage: azure-ds/
|`->_networkd_
Finished stage: (azure-
Starting stage: azure-ds/
|`->_decrypt_
Starting stage: azure-ds/
|`->_run_
Finished stage: (azure-
Starting stage: azure-ds/
|`->_run_
Finished stage: (azure-
Finished stage: (azure-
|`->_report_ready @03.42800s +00.00700s
Finished stage: (azure-
Finished stage: (azure-
Finished stage: (azure-
Finished stage: (azure-ds/setup) 00.20800 seconds
Finished stage: (init-network/
|`->reading and applying user-data @03.44500s +00.00300s
|`->reading and applying vendor-data @03.44900s +00.00000s
Starting stage: init-network/
Starting stage: azure-ds/activate
Starting stage: azure-ds/
|`->wait for ephemeral disk @03.48600s +00.00100s
|`->can_
Finished stage: (azure-
Finished stage: (azure-ds/activate) 00.00200 seconds
Finished stage: (init-network/
|`->config-migrator ran successfully @03.54000s +00.00400s
|`->config-
|`->config-bootcmd ran successfully @03.54900s +00.00000s
|`->config-
|`->config-growpart ran successfully @03.55100s +00.10400s
|`->config-resizefs ran successfully @03.65600s +00.04900s
|`->config-
|`->config-mounts ran successfully @07.13000s +00.22300s
|`->config-
|`->config-
|`->config-
|`->config-ca-certs ran successfully @07.36000s +00.00100s
|`->config-rsyslog ran successfully @07.36200s +00.00100s
|`->config-
|`->config-ssh ran successfully @07.69200s +00.26200s
Finished stage: (init-network) 04.83900 seconds
Related branches
- Dan Watkins: Needs Fixing
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 120 lines (+32/-14)4 files modifiedcloudinit/analyze/show.py (+24/-11)
cloudinit/cmd/main.py (+1/-1)
cloudinit/reporting/events.py (+6/-1)
cloudinit/sources/helpers/azure.py (+1/-1)
Changed in cloud-init: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
I was hacking on this earlier and this is mostly what's needed for "sub-stage" events.
http:// paste.ubuntu. com/p/2PWXDrBkS N/
Also, the DataSourceAzure /helper code really should get the current reporter from from stages cloud object which has a reporter. This isn't easily accessed from the datasource itself.
We may want to look at having stages update the the datasource with a reporter instance. In the mean time, it's probably accurate enought to have cloudinit/ sources/ helpers/ azure:azure_ ds_reporter to set it's reporter 'name' to:
name="init- local/search- Azure"
Which then can produce saner output like so:
$ cloud-init analyze show --infile /tmp/events.json2
-- 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 possible_ azure_ds_ devs @00.05000s +00.00100s possible_ azure_ds_ devs @00.05100s +00.22300s azure_ds_ dir @00.27400s +00.00000s azure_ovf_ pubkeys @00.27500s +00.00200s azure_ovf_ pubkeys @00.27700s +00.00000s preprovisioned_ vm_setting @00.27800s +00.00000s metadata_ from_imds @00.29800s +00.11200s metadata_ from_imds @00.41000s +00.01000s random_ seed @00.44100s +00.00100s remove_ ubuntu_ network_ config_ scripts @00.45000s +00.00100s
|`->no cache found @00.00500s +00.00100s
|`->_get_data @00.04100s +00.00000s
|`->found azure asset tag @00.04100s +00.00000s
|`->found azure asset tag @00.04100s +00.00900s
|`->list_
|`->list_
|`->load_
|`->read_azure_ovf @00.27400s +00.00100s
|`->load_
|`->load_
|`->_extract_
|`->_get_
|`->_get_
|`->_get_
|`->maybe_
|`->write_files @00.45100s +00.00200s
|`->network config from imds @00.50700s +00.00100s
Finished stage: (init-local) 00.64000 seconds
It's still not quite right as this adds the start of a nested event without a time-delta but it at least makes things look better.