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
ec2_elb: Failing with boto exception ( 400 - throttling ) #30229
Comments
From @ansibot on 2014-10-06T14:46:34Z Can You Help Us Out?Thanks for filing a ticket! I am the friendly GitHub Ansibot. It looks like you might not have filled out the issue description based on our standard issue template. You might not have known about that, and that's ok too, we'll tell you how to do it. We have a standard template because Ansible is a really busy project and it helps to have some standard information in each ticket, and GitHub doesn't yet provide a standard facility to do this like some other bug trackers. We hope you understand as this is really valuable to us!. Solving this is simple: please copy the contents of this template and paste it into the description of your ticket. That's it! If You Had A Question To Ask InsteadIf you happened to have a "how do I do this in Ansible" type of question, that's probably more of a user-list question than a bug report, and you should probably ask this question on the project mailing list instead. However, if you think you have a bug, the report is the way to go! We definitely want all the bugs filed :) Just trying to help! About Priority TagsSince you're here, we'll also share some useful information at this time. In general tickets will be assigned a priority between P1 (highest) and P5, and then worked in priority order. We may also have some follow up questions along the way, so keeping up with follow up comments via GitHub notifications is a good idea. Due to large interest in Ansible, humans may not comment on your ticket immediately. Mailing ListsIf you have concerns or questions, you're welcome to stop by the ansible-project or ansible-development mailing lists, as appropriate. Here are the links:
Thanks again for the interest in Ansible! |
From @smiller171 on 2014-10-06T14:46:34Z This problem is caused by AWS itself, because each account can only make API calls so fast before being throttled. Amazon suggests using an exponential cooldown timer. It would make sense to build such a cooldown timer into all modules that make AWS API calls, so that we don't have to build that logic into our plays. |
From @ndobbs on 2014-10-06T14:46:34Z smiller171, I completely agree. However from viewing boto source of ec2_elb_lb module, it seems as if this backoff is already implemented. I do agree with you, this logic should be implemented inside of ansible ec2* modules, however that's just my personal opinion. |
From @smiller171 on 2014-10-06T14:46:34Z It's worth noting that I had the same problem with the ec2_metric_alarm module. I have avoided the issue so far by deploying in batches with serial: 10 |
From @ndobbs on 2014-10-06T14:46:34Z smiller171, thank you for the suggestion I hadn't even considered batching the machines with serial. I have implemented the batching in my plays - hopefully we'll see at least a higher success rate with our 'light_switch' process. Thanks again for your help. |
From @acaire on 2014-10-06T14:46:34Z I ran into this today and resolved it by using the retrying library: acaire/ansible-modules-core@421f7efcc56fde85d0f54743b7ad2436735dab9e I'm assuming it'd be a stretch to add the required pip package though, or is it worth the PR? |
From @ndobbs on 2014-10-06T14:46:34Z I was able to solve this issue by implementing 'until' logic - thanks to a recommendation by @tgerla in a Tower Support ticket I created that allowed me to get the right syntax down.
|
From @ndobbs on 2014-10-06T14:46:34Z This issue was fixed by implementing controls such as until and serializing machine's in 'batches' in order to avoid the AWS throttling limit. |
From @smiller171 on 2014-10-06T14:46:34Z @ndobbs I would call that a workaround, not a solution. That said, many changes have been made and this was likely solved by now. |
From @cooniur on 2014-10-06T14:46:34Z I agree with @smiller171, the "until" solution is indeed a workaround. Ansible should provide a way of setting polling rate on cloud services (not only AWS, but also others). I got the same throttling error while using rds module to restore databases. Please consider re-open this ticket |
From @ndobbs on 2014-10-06T14:46:34Z I reopened this issue due to the fact that its not resolved and we still have people reporting in the thread. |
From @cooniur on 2014-10-06T14:46:34Z Update: this issue happens in Ansible 2.x too. |
@ansibot Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this issue with this template: |
Is this still a problem? |
@smiller171 yes:
|
@bcoca This has been an issue since 2014 and is still present. Are you able to comment on this bug? Has anyone on the team taken a look at this? I don't think it would be terribly difficult to implement retries in the case of throttling since Boto is explicit that it's a throttling error. |
+1 this is a very important issue to fix. |
According to the boto documentation for get_all_load_balancer there is an optional parameter to specify load balancer names. Even if the |
December 2019 I'm repeatedly seeing this issue. All other AWS modules are not giving me rate limit errors. I upgraded to ansible 2.9.0 and using the throttle keyword no other parts of my playbook are giving rate limit errors. However, this ec2_elb module very frequently does. I've had to try a lot of adjustments and retries to get this to reliably work. I can only assume my other modules are masking the problem by doing exponential backoff retries behind the scenes and this module is the victim: rate limited by previous module executions and having no recourse but to fail hard. It would be great if a boto3 module existed for this with the retry logic. Other modules are working great, especially in combination with throttle: 1 to avoid rate limiting. |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
ISSUE TYPE
bug report
COMPONENT NAME
ec2_elb module
ANSIBLE VERSION
Ansible 1.7.2
Boto Version 2.32.1
OS / ENVIRONMENT
Redhat Enterprise Linux 6.4 ( Ansible Tower v2.0.0)
SUMMARY
:**
I have a process "lights on" which turns on ec2 instances, then subsequently adds said instances to their respective load balancers ( defined by elb_shortname ). I get very intermittent results, sometimes the playbook will complete successfully, even consecutively at times. No matter what I do, ( change logic, implement 'pauses' etc, setting and retrieving facts ) I can not get around this AWS throttling message.
**
STEPS TO REPRODUCE
:**
Invoke playbook that turns on ec2_instances, waits and then places machines with defined elb_shortname variable into its respective group load balancer.
**
EXPECTED RESULTS
:**
**
ACTUAL RESULTS
:**
Copied from original issue: ansible/ansible-modules-core#143
The text was updated successfully, but these errors were encountered: