InstanceMetadataProvider hangs on load() 100% reproducible
See original GitHub issueHi guys,
Starting from boto3 version 1.10.0 the following code hangs on line 104:
102 t = InstanceMetadataFetcher(timeout=1000, num_attempts=2)
103 provider = InstanceMetadataProvider(iam_role_fetcher=t)
104 -> creds = provider.load()
Tracing it further it stuck request at: botocore/utils.py:296
response = self._session.send(request.prepare())
None of 1.9.xxx versions had this issue. Python 3.7.3
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When i only run the test.py file i am not getting any error so i don’t think this error is related to boto3. As you have already mentioned that this error can only be seen with kubernetes , i am assuming this is something related to kubernetes. I don’t have much knowledge about kubernetes. I would recommend posting on their github repo .
seeing this issue seems like if we reduce timeout to 1 sec, the process seems to be done. timeout as 1000 making it look like third line is unreachable, but anyway why are we waiting for timeout to give a response is the problem.