Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

TUT-974 Prevent retrying on 401#42

Merged
tifayuki merged 1 commit intostagingfrom
prevent_retrying_on_401
May 18, 2016
Merged

TUT-974 Prevent retrying on 401#42
tifayuki merged 1 commit intostagingfrom
prevent_retrying_on_401

Conversation

@tifayuki
Copy link
Copy Markdown
Contributor

No description provided.

@tifayuki tifayuki force-pushed the staging branch 7 times, most recently from 926c13d to b240ece Compare April 26, 2016 16:28
@tifayuki tifayuki force-pushed the prevent_retrying_on_401 branch 3 times, most recently from 5d8e976 to dfa60d3 Compare April 28, 2016 15:05
Comment thread haproxy/eventhandler.py
events.run_forever()
except dockercloud.AuthError as e:
logger.info("Auth error: %s, retry in 1 hour" % e)
time.sleep(3600)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it likely that the authentication credentials will be valid in 1 hour? Once they're bad, won't they be bad forever?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evanp
no, once a credential is invalid, it is bad forever. Sending a request with an invalid auth once per hour will not get you blocked by the server. However, if we make the container quits immediately, as many users run this image with autorestart, the container may retry with the bad auth many times in a short period of time, and you may get blocked by the server.

@tifayuki tifayuki force-pushed the prevent_retrying_on_401 branch from 44ac67b to 6765512 Compare May 9, 2016 16:35
@tifayuki tifayuki force-pushed the prevent_retrying_on_401 branch from 6765512 to 7fc4eea Compare May 10, 2016 11:12
@tifayuki tifayuki merged commit 79442da into staging May 18, 2016
@tifayuki tifayuki deleted the prevent_retrying_on_401 branch May 18, 2016 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants