canonical / canonical/cloud-init
empty seed dir /var/lib/cloud/seed/config_drive causes WARNING
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1771167](https://bugs.launchpad.net/cloud-init/+bug/1771167)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2018-05-14T17:34:38.418942+00:00
date_fix_committed = None
date_fix_released = None
id = 1771167
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1771167
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = triaged
submitter = smoser
submitter_name = Scott Moser
tags = []
duplicates = []
_Launchpad user **Scott Moser(smoser)** wrote on 2018-05-14T17:34:38.418942+00:00_
A completely empty /var/lib/cloud/seed/config_drive directory causes cloud-init to show a warning.
It would seem that a completely empty dir should not cause warning on invalid seed, but less-loudly just go on.
From a 16.04 image launched on IBM Cloud (http://paste.ubuntu.com/p/dGGrPjBhrB/).
2018-05-14 16:21:56,350 - util.py[DEBUG]: Cloud-init v. 18.2 running 'init-local' at Mon, 14 May 2018 16:21:56 +0000. Up 101.66 seconds.
2018-05-14 16:21:56,350 - main.py[DEBUG]: No kernel command line url found.
2018-05-14 16:21:56,350 - main.py[DEBUG]: Closing stdin.
2018-05-14 16:21:56,358 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [644] 0 bytes
2018-05-14 16:21:56,359 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 104:4
2018-05-14 16:21:56,359 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance/boot-finished
2018-05-14 16:21:56,359 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/no-net
2018-05-14 16:21:56,359 - handlers.py[DEBUG]: start: init-local/check-cache: attempting to read from cache [check]
2018-05-14 16:21:56,360 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2018-05-14 16:21:56,360 - stages.py[DEBUG]: no cache found
2018-05-14 16:21:56,360 - handlers.py[DEBUG]: finish: init-local/check-cache: SUCCESS: no cache found
2018-05-14 16:21:56,360 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2018-05-14 16:21:56,365 - stages.py[DEBUG]: Using distro class
2018-05-14 16:21:56,366 - __init__.py[DEBUG]: Looking for data source in: ['ConfigDrive', 'NoCloud'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM']
2018-05-14 16:21:56,375 - __init__.py[DEBUG]: Searching for local data source in: ['DataSourceConfigDrive', 'DataSourceNoCloud']
2018-05-14 16:21:56,375 - handlers.py[DEBUG]: start: init-local/search-ConfigDrive: searching for local data from DataSourceConfigDrive
2018-05-14 16:21:56,375 - __init__.py[DEBUG]: Seeing if we can get any data from
2018-05-14 16:21:56,375 - openstack.py[DEBUG]: Unable to read openstack versions from /var/lib/cloud/seed/config_drive due to: [Errno 2] No such file or directory: '/var/lib/cloud/seed/config_drive/openstack'
2018-05-14 16:21:56,376 - openstack.py[DEBUG]: Selected version 'latest' from []
2018-05-14 16:21:56,376 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/config_drive/openstack/latest/meta_data.json (quiet=False)
2018-05-14 16:21:56,376 - openstack.py[DEBUG]: Failed reading mandatory path /var/lib/cloud/seed/config_drive/openstack/latest/meta_data.json due to: [Errno 2] No such file or directory: '/var/lib/cloud/seed/config_drive/openstack/latest/meta_data.json'
2018-05-14 16:21:56,376 - util.py[WARNING]: Failed reading config drive from /var/lib/cloud/seed/config_drive
2018-05-14 16:21:56,380 - util.py[DEBUG]: Failed reading config drive from /var/lib/cloud/seed/config_drive
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py", line 65, in _get_data
results = read_config_drive(sdir)
File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py", line 176, in read_config_drive
raise excps[-1]
File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py", line 173, in read_config_drive
return functor(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py", line 377, in read_v1
raise NonReadable("%s: no files found" % (self.base_path))
cloudinit.sources.helpers.openstack.NonReadable: /var/lib/cloud/seed/config_drive: no files found
Contributor guide
Assessment
This issue has not been assessed yet.