This bug was originally filed in Launchpad as LP: #1771382
Launchpad details
affected_projects = ['cloud-init (openSUSE)']
assignee = None
assignee_name = None
date_closed = 2018-06-20T18:06:00.396760+00:00
date_created = 2018-05-15T15:37:38.152796+00:00
date_fix_committed = 2018-05-22T14:11:10.843529+00:00
date_fix_released = 2018-06-20T18:06:00.396760+00:00
id = 1771382
importance = low
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1771382
milestone = None
owner = ms-proact
owner_name = Martin Steigerwald
private = False
status = fix_released
submitter = ms-proact
submitter_name = Martin Steigerwald
tags = []
duplicates = []
Launchpad user Martin Steigerwald(ms-proact) wrote on 2018-05-15T15:37:38.152796+00:00
cloud-init 18.2 from http://download.opensuse.org/repositories/Cloud:/Tools/SLE_12_SP3/ on SLES 12 SP 3 with NoCloud data source via Cloud Init drive made by Proxmox.
On SLES 12 SP3 NoCloud data source was not working, despite
slestemplate:~ # blkid -c /dev/null -o export
[…]
DEVNAME=/dev/sr0
UUID=2018-05-15-16-34-27-00
LABEL=cidata
TYPE=iso9660
[…]
with necessary files on it. blkid gives 0 as returncode
Why?
I only kept parts of the output:
slestemplate:/etc/cloud # cat /run/cloud-init/ds-identify.log
[up 8.63s] ds-identify
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
ERROR: failed running [127]: blkid -c /dev/null -o export
[…]
FS_LABELS=unavailable:error
ISO9660_DEVS=unavailable:error
It might have been that I did not yet add the CloudInit drive in Proxmox yet.
A subsequent call to
slestemplate:~ # /usr/lib/cloud-init/ds-identify
did not yet yield a different result.
Only by analysing the source I found that it caches results and I can use the --force option to override this. I did this and the NoCloud datasource got detected properly. Apparently this is cached now.
The tool would only inform of the caching as a DEBUG message. However I set logging to INFO for all parts of Cloud Init as the FileHandler clutters the log with tons of messages how many bytes it read from each file. Sure, I could use INFO only for FileHandler.
Several issues reduce the ease of administration here:
-
Don´t cache errors. Really… just… don´t.
-
Don´t cache errors almost silently (just as a debug message).
-
Decide wisely what is a debug message and what is not.
-
A search for ds-identify in the documentation available at https://cloudinit.readthedocs.io/en/latest/ did not yield any result.
-
And in general: Keep it short and simple.
IMHO the first is the most important: Don´t cache errors. If the resource now is there, recognize it, without further discussion.
Related bugs:
- bug 1791691: [systemd] PATH broken in systemd units
This bug was originally filed in Launchpad as LP: #1771382
Launchpad details
Launchpad user Martin Steigerwald(ms-proact) wrote on 2018-05-15T15:37:38.152796+00:00
cloud-init 18.2 from http://download.opensuse.org/repositories/Cloud:/Tools/SLE_12_SP3/ on SLES 12 SP 3 with NoCloud data source via Cloud Init drive made by Proxmox.
On SLES 12 SP3 NoCloud data source was not working, despite
slestemplate:~ # blkid -c /dev/null -o export
[…]
DEVNAME=/dev/sr0
UUID=2018-05-15-16-34-27-00
LABEL=cidata
TYPE=iso9660
[…]
with necessary files on it. blkid gives 0 as returncode
Why?
I only kept parts of the output:
slestemplate:/etc/cloud # cat /run/cloud-init/ds-identify.log
[up 8.63s] ds-identify
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
ERROR: failed running [127]: blkid -c /dev/null -o export
[…]
FS_LABELS=unavailable:error
ISO9660_DEVS=unavailable:error
It might have been that I did not yet add the CloudInit drive in Proxmox yet.
A subsequent call to
slestemplate:~ # /usr/lib/cloud-init/ds-identify
did not yet yield a different result.
Only by analysing the source I found that it caches results and I can use the
--forceoption to override this. I did this and the NoCloud datasource got detected properly. Apparently this is cached now.The tool would only inform of the caching as a DEBUG message. However I set logging to INFO for all parts of Cloud Init as the FileHandler clutters the log with tons of messages how many bytes it read from each file. Sure, I could use INFO only for FileHandler.
Several issues reduce the ease of administration here:
Don´t cache errors. Really… just… don´t.
Don´t cache errors almost silently (just as a debug message).
Decide wisely what is a debug message and what is not.
A search for
ds-identifyin the documentation available at https://cloudinit.readthedocs.io/en/latest/ did not yield any result.And in general: Keep it short and simple.
IMHO the first is the most important: Don´t cache errors. If the resource now is there, recognize it, without further discussion.
Related bugs: