imds: add basic support for Openstack (#44645)

This was tested on OVHCloud. Unfortunately, Nova provides most of the
information (such as IP v6) as a json file with a specific API, so we
rely on the EC2 compat API.

On OVH, the public IP v4 is not in public-ipv4, but in local-ipv4, and
there is no /1.0/meta-data/public-ipv4 URL. From what I know, this is
openstack installation dependant, but public-ipv4 is the documented
place where it should be.
This commit is contained in:
mscherer authored and GitHub committed 2026-11-05 11:29:20 +00:00
1 parent 73e0c4a9b6
commit 77dbbd26b4
1 file changed
+11
+11
View File
@@ -83,6 +83,17 @@ dmi:bvnHetzner:*
IMDS_KEY_SSH_KEY=/public-keys/0
IMDS_KEY_USERDATA=/userdata
# https://docs.openstack.org/nova/latest/user/metadata.html
dmi:*:svnOpenStackFoundation:*
IMDS_VENDOR=openstack
IMDS_DATA_URL=http://169.254.169.254
IMDS_ADDRESS_IPV4=169.254.169.254
IMDS_ADDRESS_IPV6=fe80::a9fe:a9fe
IMDS_KEY_HOSTNAME=/1.0/meta-data/hostname
IMDS_KEY_IPV4_PUBLIC=/1.0/meta-data/public-ipv4
IMDS_KEY_SSH_KEY=/1.0/meta-data/public-keys/0/openssh-key
IMDS_KEY_USERDATA=/openstack/latest/user_data
# https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/gettingmetadata.htm#metadata-keys
dmi:*:catOracleCloud.com:*
IMDS_VENDOR=oracle-cloud-oci