canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization

Home Page:https://cloud-init.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[docs]: EC2 default metadata_urls missing a dot

candlerb opened this issue · comments

Documentation request

Page: https://cloudinit.readthedocs.io/en/latest/reference/datasources/ec2.html#metadata-urls

(EC2 data source, metadata_urls parameter) states:

Default: [’http://169.254.169.254/’, ‘http://[fd00:ec2::254/]’, ‘http://instance-data:8773/’].

However, the last of these should have a dot after instance-data, as witnessed by the source code:

https://github.com/canonical/cloud-init/blob/23.4.3/cloudinit/sources/DataSourceEc2.py#L63-L67

The presence of the dot is significant, see LP#2039723, and was introduced in commit b81d5ed

Also, the trailing slash is in the wrong place in ‘http://[fd00:ec2::254/]’

(Aside: the default URLs in the code don't have trailing slashes at all, but by itself that's not a significant difference)

Thanks, @candlerb, for reporting this. The documentation needs to be upgraded.