Public bug reported:
Azure IMDS service doesn't seem to be available during initial instance
boot.
Cloud-init tries 4 times and gives up. This doesn't seem to be enough
and cloud-init fallsback to basic network configuration of 1 network
device, ignoring any additional devices the user had attached to the vm.
Sometime after cloud-configuration completes, I'm able to properly run
get_metadata_from_imds without issue
$ python3 -c 'from cloudinit.sources.DataSourceAzure import
get_metadata_from_imds; print(get_metadata_from_imds("eth0", 4))'
Below is the excerpt of cloud-init failing to get IMDS data (which is emitted
do to runs of get_metadata_from_imds()).
2018-12-05 18:07:53,893 - url_helper.py[DEBUG]: [0/4] open
'http://169.254.169.254/metadata/instance?api-version=2017-12-01' with {'url':
'http://169.254.169.254/metadata/instance?api-version=2017-12-01',
'allow_redirects': True, 'method': 'GET', 'timeout': 1.0, 'headers':
{'User-Agent': 'Cloud-Init/18.4-24-g8f812a15-0ubuntu1', 'Metadata': 'true'}}
configuration
2018-12-05 18:07:54,899 - url_helper.py[DEBUG]: Please wait 1 seconds while we
wait to try again
2018-12-05 18:07:55,900 - url_helper.py[DEBUG]: [1/4] open
'http://169.254.169.254/metadata/instance?api-version=2017-12-01' with {'url':
'http://169.254.169.254/metadata/instance?api-version=2017-12-01',
'allow_redirects': True, 'method': 'GET', 'timeout': 1.0, 'headers':
{'User-Agent': 'Cloud-Init/18.4-24-g8f812a15-0ubuntu1', 'Metadata': 'true'}}
configuration
2018-12-05 18:07:56,902 - url_helper.py[DEBUG]: Please wait 1 seconds while we
wait to try again
2018-12-05 18:07:57,904 - url_helper.py[DEBUG]: [2/4] open
'http://169.254.169.254/metadata/instance?api-version=2017-12-01' with {'url':
'http://169.254.169.254/metadata/instance?api-version=2017-12-01',
'allow_redirects': True, 'method': 'GET', 'timeout': 1.0, 'headers':
{'User-Agent': 'Cloud-Init/18.4-24-g8f812a15-0ubuntu1', 'Metadata': 'true'}}
configuration
2018-12-05 18:07:58,906 - url_helper.py[DEBUG]: Please wait 1 seconds while we
wait to try again
2018-12-05 18:07:59,907 - url_helper.py[DEBUG]: [3/4] open
'http://169.254.169.254/metadata/instance?api-version=2017-12-01' with {'url':
'http://169.254.169.254/metadata/instance?api-version=2017-12-01',
'allow_redirects': True, 'method': 'GET', 'timeout': 1.0, 'headers':
{'User-Agent': 'Cloud-Init/18.4-24-g8f812a15-0ubuntu1', 'Metadata': 'true'}}
configuration
2018-12-05 18:08:00,910 - DataSourceAzure.py[DEBUG]: Ignoring IMDS instance
metadata: HTTPConnectionPool(host='169.254.169.254', port=80): Max retries
exceeded with url: /metadata/instance?api-version=2017-12-01 (Caused by
ConnectTimeoutError(<urllib3.connection.HTTPConnection object at
0x7f2c9bb6f3c8>, 'Connection to 169.254.169.254 timed out. (connect
timeout=1.0)'))
ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: cloud-init 18.4-24-g8f812a15-0ubuntu1
ProcVersionSignature: Ubuntu 4.18.0-1003.3-azure 4.18.12
Uname: Linux 4.18.0-1003-azure x86_64
ApportVersion: 2.20.10-0ubuntu14
Architecture: amd64
CloudName: Azure
Date: Wed Dec 5 18:18:23 2018
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
user_data.txt:
## template: jinja
#cloud-config
ssh_import_id : [chad.smith]
hostname: SRU-worked-{{v1.cloud_name}}
** Affects: cloud-init (Ubuntu)
Importance: High
Status: Triaged
** Tags: amd64 apport-bug disco uec-images
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806975
Title:
Azure: IMDS not enough retries during boot for network config
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1806975/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs