Azure: IMDS service not retried on timeout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
cloud-init 18.4-7-
Per configuration in the azure datasource, it should retry 4 times before failing, but logs only list one attempt at http://
We can see this in the following excerpt of /var/log/
2018-10-26 17:26:51,162 - url_helper.
2018-10-26 17:26:52,168 - DataSourceAzure
2018-10-26 17:26:52,168 - util.py[DEBUG]: Crawl of Azure Instance Metadata Service (IMDS) took 1.007 seconds
Only 1 attempt (out of 4) was attempted and then Azure datasource gave up after receiving a ConnectTimeoutE
At a later time on the instance, I was able to see that the IMDS service was available using the following python script:
$ python3 -c 'from cloudinit.
{'compute': {'location': 'eastus2', 'name': 'my-c1', 'offer': 'UbuntuServer', 'osType': 'Linux', 'placementGroupId': '', 'platformFaultD
Related branches
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 168 lines (+71/-16)4 files modifiedcloudinit/sources/DataSourceAzure.py (+3/-15)
cloudinit/tests/test_url_helper.py (+24/-1)
cloudinit/url_helper.py (+14/-0)
tests/unittests/test_datasource/test_azure.py (+30/-0)
Released in cloud-init v18.4-22- g6062595b- 0ubuntu1. Currently avaialable in Ubuntu Disco series.