cloud-init
cloud-init copied to clipboard
Warning in logs on EC2 in v6-only environment
In a v6-only environment on EC2, we attempt to reach IMDS via v4 but fail. This is expected. The v6 connection also seems to take longer to work. Both of these wind up logging a warning:
2024-06-06 21:21:10,554 - url_helper.py[WARNING]: Exception(s) [UrlError("HTTPConnectionPool(host='169.254.169.254', port=80): M
ax retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c
91f1482bd0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), UrlError("HTTPConnectionPool(host='f
d00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTT
PConnection object at 0x7c91f133d100>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")] during req
uest to http://[fd00:ec2::254]/latest/api/token, raising last exception
2024-06-06 21:21:10,554 - url_helper.py[WARNING]: Calling 'http://[fd00:ec2::254]/latest/api/token' failed [0/120s]: request err
or [HTTPConnectionPool(host='fd00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnection
Error('<urllib3.connection.HTTPConnection object at 0x7c91f133d100>: Failed to establish a new connection: [Errno 101] Network i
s unreachable'))]
ubuntu@i-093c1d9617261fd90:~$ cloud-init status --long
status: done
extended_status: degraded done
boot_status_code: enabled-by-generator
last_update: Thu, 06 Jun 2024 21:21:56 +0000
detail: DataSourceEc2Local
errors: []
recoverable_errors:
WARNING:
- Exception(s) [UrlError("HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c91f1482bd0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), UrlError("HTTPConnectionPool(host='fd00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c91f133d100>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")] during request to http://[fd00:ec2::254]/latest/api/token, raising last exception
- Calling 'http://[fd00:ec2::254]/latest/api/token' failed [0/120s]: request error [HTTPConnectionPool(host='fd00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c91f133d100>: Failed to establish a new connection: [Errno 101] Network is unreachable'))]
ubuntu@i-093c1d9617261fd90:~$ echo $?
2
This doesn't seem like it should be a "degraded done" case.