Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add retry and timeout as params to retrieving metadata service #202

merged 2 commits into from Jan 9, 2014


None yet
3 participants

jamesls commented Jan 8, 2014

Fixes #198.

I did not add any config vars to the session to set these default values. However, I think it makes sense to add this (similar to how you can set these values in a boto config file). I'd like to send that as a separate pull request.

This only updates the low level metadata retrieval code so that it can be parameterized the number of retries and the connection timeouts.

jamesls added some commits Jan 8, 2014

Allow configurable metadata service timeouts
The default has been changed to 1, which is now consistent with
boto and other AWS SDKs.
Allow metadata attempts to be retried
Note that this does not plumb anything into the session via
config vars.  I think that should be a separate pull request.

@toastdriven toastdriven commented on the diff Jan 8, 2014

@@ -310,7 +310,7 @@ def set_credentials(self, access_key, secret_key, token=None):
self._credentials.method = 'explicit'
- def get_credentials(self, metadata=None):

toastdriven Jan 8, 2014


Do we need to worry about back-compat here (from removing a parameter)? Would anyone else be calling this or is it (hopefully) largely just internal?


jamesls Jan 8, 2014


Internal, especially given the "This is mainly used for unit testing." in the docstring.


toastdriven Jan 8, 2014


My bad, I didn't read the whole docstring you were removing. Shipit stands.


toastdriven commented Jan 8, 2014

LGTM otherwise. :shipit:


garnaat commented Jan 8, 2014

Would definitely like to see these pulled out as config vars but I'm fine with doing that as a separate PR. LGTM

@jamesls jamesls merged commit 5b772b2 into boto:develop Jan 9, 2014

1 check passed

default The Travis CI build passed

@jamesls jamesls deleted the jamesls:iam-metadata-timeout branch Jun 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment