> Looking at the output provided, all we can tell is that we're on
> VMWare, but no indication that it's OpenStack, so cloud-init can't
> reasonable expect to know that it should enable the OpenStack
> datasource.
Let me mention again that this bug was introduced in Ubuntu 18.04; previous versions do not suffer from the same problem.
Also, if I modify the official cloud image and disable any datasource
*except* Ec2 (i.e., write `datasource_list: [ Ec2 ]` into
`/etc/cloud/cloud.cfg.d/90_dpkg.cfg`), then everything works fine.
So the issue is really `ds-identify` being too picky about when the
`Ec2` datasource is valid; from a cursory look, I can see that it just
checks if `/sys/hypervisor` contains some well-known AWS tag -- but
there are many cloud services which provide EC2-compatible metadata
(OpenNebula being another example), which would be skipped by this
logic!
> In the above dump of DMI data, is VMware Virtual Platform specific
> to VIO? and does VIO always expose metadata service?
This I do not know; I'm just a user, not a developer of the VIO
platform. But I don't see why probing for metadata sources should be
done only by looking at DMI information? EC2 metadata is handed out
by 169.254.169.254, if well-known locations for metadata are
available, then the EC2 datasource should be considered valid. (Other,
more specific, datasources can be probed earlier so they can be used
if found.)
This is a dump of the EC2 metadata that I can see from an instance in
VIO (same VM from whence the above files were extracted):
> Looking at the output provided, all we can tell is that we're on
> VMWare, but no indication that it's OpenStack, so cloud-init can't
> reasonable expect to know that it should enable the OpenStack
> datasource.
Let me mention again that this bug was introduced in Ubuntu 18.04; previous versions do not suffer from the same problem.
Also, if I modify the official cloud image and disable any datasource cloud.cfg. d/90_dpkg. cfg`), then everything works fine.
*except* Ec2 (i.e., write `datasource_list: [ Ec2 ]` into
`/etc/cloud/
So the issue is really `ds-identify` being too picky about when the
`Ec2` datasource is valid; from a cursory look, I can see that it just
checks if `/sys/hypervisor` contains some well-known AWS tag -- but
there are many cloud services which provide EC2-compatible metadata
(OpenNebula being another example), which would be skipped by this
logic!
> In the above dump of DMI data, is VMware Virtual Platform specific
> to VIO? and does VIO always expose metadata service?
This I do not know; I'm just a user, not a developer of the VIO
platform. But I don't see why probing for metadata sources should be
done only by looking at DMI information? EC2 metadata is handed out
by 169.254.169.254, if well-known locations for metadata are
available, then the EC2 datasource should be considered valid. (Other,
more specific, datasources can be probed earlier so they can be used
if found.)
This is a dump of the EC2 metadata that I can see from an instance in
VIO (same VM from whence the above files were extracted):
root@ubuntu:~# w3m -dump http:// 169.254. 169.254/ latest/ meta-data/ launch- index manifest- path device- mapping/ 169.254. 169.254/ latest/ meta-data/ ami-id 169.254. 169.254/ latest/ meta-data/ ami-launch- index 169.254. 169.254/ latest/ meta-data/ ami-manifest- path 169.254. 169.254/ latest/ meta-data/ hostname 169.254. 169.254/ latest/ meta-data/ instance- action 169.254. 169.254/ latest/ meta-data/ instance- id 169.254. 169.254/ latest/ meta-data/ instance- type 169.254. 169.254/ latest/ meta-data/ local-hostname 169.254. 169.254/ latest/ meta-data/ local-ipv4 169.254. 169.254/ latest/ meta-data/ public- hostname 169.254. 169.254/ latest/ meta-data/ public- ipv4 169.254. 169.254/ latest/ meta-data/ reservation- id 169.254. 169.254/ latest/ meta-data/ security- groups
ami-id
ami-
ami-
block-
hostname
instance-action
instance-id
instance-type
local-hostname
local-ipv4
placement/
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups
root@ubuntu:~# w3m -dump http://
ami-0000012a
root@ubuntu:~# w3m -dump http://
0
root@ubuntu:~# w3m -dump http://
FIXME
root@ubuntu:~# w3m -dump http://
test.novalocal
root@ubuntu:~# w3m -dump http://
none
root@ubuntu:~# w3m -dump http://
i-00000793
root@ubuntu:~# w3m -dump http://
m1.small
root@ubuntu:~# w3m -dump http://
test.novalocal
root@ubuntu:~# w3m -dump http://
172.31.33.70
root@ubuntu:~# w3m -dump http://
test.novalocal
root@ubuntu:~# w3m -dump http://
root@ubuntu:~# w3m -dump http://
r-0asb5l2b
root@ubuntu:~# w3m -dump http://
default
Thanks,
Riccardo