-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-retry idempotent requests #453
Comments
Sounds like a good idea! I think we could offer the feature as an option, for instance as a global parameter. |
That sounds good! However, I think it would be even better for some of the API calls if the option was the default, as they are idempotent in OpenStack. That should for example apply to all the |
My concern is about the impact on existing deployments and more precisely is on what type of errors the |
Yes. But in those cases, I think you cannot be sure the request you issued before didn't make it to OpenStack and hence you might, for example, create another disk if you retried the call. That's why those calls should fail. But, calls like GET or DELETE should be easily repeatable as issuing them multiple times should always result in the same state in OpenStack. Regarding your concerns about existing deployments: |
Thanks for the details, it makes sense that GET and DELETE are idempotent by nature vs the modifying verbs. For the option we could combine both options What do you think? |
Sounds good. What would the default be for the list of verbs? Shouldn't it then be something like
A more generic solution proposed by @voelzmo is to provide a callback in the global settings that decides if a specific call should be retried on basis of request data:
This callback would then be called before issuing every request, defaulting to false if |
I've tested some initial code with #462. The default cannot be true because it breaks the tests and might also impact existing deployments. So you have to activate it (:idempotent => yes). |
Sorry I saw your comment after my latest post. Well I suppose there are several ways to accomplish the same thing ;). The important thing, I think, is that |
@gildub, I'm fine with the verb-based proposal as well. :) |
Hi @gildub, any suggestion when this will get released? |
@NautiluX, I'll update the related PR this week. |
@NautiluX, I've updated and finished the PR for an initial review. Please feel free to test it for feedback or any issues. Cheers |
Hi @gildub great to hear, thanks for that! Not sure how quickly we will be able to look at it, but I will forward it to the BOSH OpenStack CPI team. |
When accessing OpenStack API with idempotent requests, my guess is that should apply to at least all GET or DELETE requests, they should be retried automatically in case of an error.
As an example take the request in list_ports.
It seems like excon already supports options to retry requests as the README states.
We face failures due to network issues repeatedly, which are not required to fail whole workflows without giving it a second try, hence this would be a very helpful improvement for us.
The text was updated successfully, but these errors were encountered: