Open igalic opened 10 months ago
I had a look at that.
So it uses this sysctl
command, which returns a very thin output:
# sysctl -n hw.disknames
cd0:,cd1:,sd0:34abf85fbe2151ba,fd0:
To know if there's something behind cd0, cd1, fd0, disklabel
can be used:
disklabel cd0
# /dev/rcd0c:
type: ATAPI
disk: cidata
label:
duid: 0000000000000000
flags:
bytes/sector: 2048
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 2
total sectors: 182
boundstart: 0
boundend: 182
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 182 0 ISO9660
c: 182 0 ISO9660
Bug report
in ds-identify, OpenBSD disk detection doesn't exist, which means it uses the Linux paths, which don't work. in the Python code, the disk-detection looks rather questionable:
https://github.com/canonical/cloud-init/blob/4f60ff099eb0a6f57595706f4d34cf713d3c02b1/cloudinit/util.py#L1444-L1458
none of the
criteria
are actually considered. We only return any foundcd
drives, whether those have anything mounted or not. But a source could just as well be mounted as disk.Steps to reproduce the problem
datasource_list
to NoCloud or ConfigDrive, depending on your formatcloud-init clean -slr
Environment details