dynect responses taking longer than 5 seconds cause converge failures
Opened this issue · 1 comments
Cookbook version
current
Chef-client version
all versions
Platform Details
all platforms
Scenario:
Normally this cookbook works fine, but whenever the dynect API is slow it causes converges to fail.
This is problematic when we can't converge production resources often, and especially since it adds a dependency on the performance of a 3rd party API.
https://help.dyn.com/rest/#Job
If a request takes longer than 5 seconds to generate data, the API will instead respond with a Temporary Redirect (HTTP 307) and the URI of the Job. Your program can then periodically check the job results until they become available.
This is more an issue with the underlying gem than it is with the cookbook itself.
I think the gem is chef maintained?
If so - if someone can take a look at the below PR the issue can be handled and fixed in the dependent gem itself:
See - adamhjk/dynect_rest#47
Steps to Reproduce:
It's tough to reproduce but we experience this issue very often, perhaps because of the large size of our zones.
Expected Result:
the gem (or cookbook?) polls for the job_id until there is a response, so the converge can succeed
Actual Result:
The converge fails with an exception like -
URI::InvalidURIError:
# bad URI(is not URI?): https://api2.dynect.net/REST/{"status":"incomplete","job_id":1279356988,"msgs":[{"INFO":"get: Found the record","SOURCE":"API-B","ERR_CD":null,"LVL":"INFO"}]}
Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.
If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.