From 8ea9a9c2c3621b6cb2890abac543885af3b40970 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 19 Dec 2011 12:00:48 -0500 Subject: make DataSourceEc2 more resilliant to slow metadata service (LP: #894279) This increases the timeout for a metadata request to something that should be easily satisfiable (50 seconds). But hopefully does so while still keeping the case of no-metadata service in mind. Previously, there was a small timeout and many retries (30) would be done. Now, - larger timeout (50 seconds) by default - retry until a given "max_wait" is reached (120 seconds default) The end result is that if we're hitting the timeout, there will only end up being a couple attempts made. But if the requests are coming back quickly then we'll still make several attempts. There is one EC2DataSource config change, now 'retries' is not used, but rather 'max_wait' to indicate generally how long it should try to find a metadata service. --- doc/examples/cloud-config-datasources.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/examples/cloud-config-datasources.txt b/doc/examples/cloud-config-datasources.txt index c6708a2c..b86c5ba6 100644 --- a/doc/examples/cloud-config-datasources.txt +++ b/doc/examples/cloud-config-datasources.txt @@ -2,16 +2,14 @@ datasource: # Ec2 Ec2: - # timeout: the timeout value for attempt at metadata service - timeout : 2 - # the number of tries that should be attempted at the metadata service - # after each try, a sleep of int(try_number/5)+1 is done - # default is 30 - retries : 30 + # timeout: the timeout value for a request at metadata service + timeout : 50 + # The length in seconds to wait before giving up on the metadata + # service. The actual total wait could be up to + # len(resolvable_metadata_urls)*timeout + max_wait : 120 #metadata_url: a list of URLs to check for metadata services metadata_urls: - http://169.254.169.254:80 - http://instance-data:8773 - - -- cgit v1.2.3