For starters, what ansible --version are you using?


On Tue, Sep 30, 2014 at 11:49 AM, Nate Dobbs <[email protected]>
wrote:

> Hello fellow ansible users.
>
> I have a process that turns on ec2 instances, then subsequently adds said
> instances to their respective load balancers. 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.
>
> ansible code:
> - name: starting instance(s)
>   when: instance_id is defined and lights_on|default ("false") == "true"
>   local_action: ec2
>   args:
>     region: 'us-west-2'
>     instance_ids: "{{ instance_id }}"
>     state: 'running'
>     wait: 'yes'
>     wait_timeout: '300'
>   register: ec2
>
> - name: Pausing, trying to avoid AWS throttling
>   pause: minutes=10
>
> - name: registering instance to its respective groups ELB
>   # instances that do not require ELBs do not need to run this part of the
> playbook
>   when: elb_shortname is defined and lights_on|default ("false") == "true"
>   local_action: ec2_elb
>   args:
>     region: 'us-west-2'
>     state: 'present'
>     wait: 'yes'
>     wait_timeout: '300'
>
> Output:
>
> TASK: [roles/lights_on | registering instance to its respective groups
> ELB] ***
> failed: [tstmaorawss01 -> 127.0.0.1] => {"failed": true, "parsed": false}
> invalid output was: Traceback (most recent call last):
>   File
> "/Users/ndobbs/.ansible/tmp/ansible-tmp-1412091621.06-77576803493759/ec2_elb",
> line 1874, in <module>
>     main()
>   File
> "/Users/ndobbs/.ansible/tmp/ansible-tmp-1412091621.06-77576803493759/ec2_elb",
> line 326, in main
>     elb_man.register(wait, enable_availability_zone, timeout)
>   File
> "/Users/ndobbs/.ansible/tmp/ansible-tmp-1412091621.06-77576803493759/ec2_elb",
> line 159, in register
>     self._await_elb_instance_state(lb, 'InService', initial_state, timeout)
>   File
> "/Users/ndobbs/.ansible/tmp/ansible-tmp-1412091621.06-77576803493759/ec2_elb",
> line 196, in _await_elb_instance_state
>     instance_state = self._get_instance_health(lb)
>   File
> "/Users/ndobbs/.ansible/tmp/ansible-tmp-1412091621.06-77576803493759/ec2_elb",
> line 244, in _get_instance_health
>     status = lb.get_instance_health([self.instance_id])[0]
>   File "/Library/Python/2.7/site-packages/boto/ec2/elb/loadbalancer.py",
> line 324, in get_instance_health
>     return self.connection.describe_instance_health(self.name, instances)
>   File "/Library/Python/2.7/site-packages/boto/ec2/elb/__init__.py", line
> 547, in describe_instance_health
>     [('member', InstanceState)])
>   File "/Library/Python/2.7/site-packages/boto/connection.py", line 1166,
> in get_list
>     raise self.ResponseError(response.status, response.reason, body)
> boto.exception.BotoServerError: BotoServerError: 400 Bad Request
> <ErrorResponse xmlns="
> http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/";>
>   <Error>
>     <Type>Sender</Type>
>     <Code>Throttling</Code>
>     <Message>Rate exceeded</Message>
>   </Error>
>   <RequestId>1a08966d-48b8-11e4-8ddc-e3515a48666b</RequestId>
> </ErrorResponse>
>
> Any insights as to what I can change to make this successful would be
> greatly appreciated. Thank you for your time.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/10b7e184-cd7f-44de-bfc3-a182853b27b8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/10b7e184-cd7f-44de-bfc3-a182853b27b8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzz4XmtynK3CC%2BKBwa65SwFUP1KXXG2Zg8JmCKoYYBt2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to