Skip to content

Commit 723ec49

Browse files
author
Matt Pryor
authored
Merge pull request #2 from azimuth-cloud/bertiethorpe-patch-1
Add a timeout to the metadata fetch in ansible-init.py
2 parents 5ff4ccc + f74b94c commit 723ec49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/linux_ansible_init/files/ansible-init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def ansible_exec(cmd, *args, **kwargs):
4141

4242
logger.info("fetching instance metadata")
4343
METADATA_URL = "http://169.254.169.254/openstack/latest/meta_data.json"
44-
response = requests.get(METADATA_URL)
44+
response = requests.get(METADATA_URL, timeout=300)
4545
response.raise_for_status()
4646
user_metadata = response.json().get("meta", {})
4747

0 commit comments

Comments
 (0)