canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.99k stars 881 forks source link

collect logs: grab /var/lib/cloud data files #3191

Open ubuntu-server-builder opened 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1775074

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2018-06-04T20:35:00.517305+00:00
date_fix_committed = None
date_fix_released = None
id = 1775074
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1775074
milestone = 18.4
owner = chad.smith
owner_name = Chad Smith
private = False
status = confirmed
submitter = chad.smith
submitter_name = Chad Smith
tags = []
duplicates = []

Launchpad user Chad Smith(chad.smith) wrote on 2018-06-04T20:35:00.517305+00:00

collect-logs only does not capture /var/lib/cloud/seed input files while creating a log tarfile. These files can be helpful in understanding what the image or datasource is using as input to cloud-init.

Also be more failure tolerant of /var/lib/cloud/instance not yet being present in undiscovered datasources environments. (DatasourceNone)

ubuntu-server-builder commented 1 year ago

Launchpad user Chad Smith(chad.smith) wrote on 2018-06-04T22:22:55.650113+00:00

Also per https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1775086 /var/lib/cloud/instance may not yet exist in error'd environments.

user_data.txt: Error: [Errno 2] No such file or directory: '/var/lib/cloud/instance/user-data.txt'