Open pgcorchary opened 10 years ago
@pgcorchary If you could put together a pull request, I'd gladly review it for merging.
AWS also has an API rate limit. When you hit it, your request returns with a RequestLimitExceeded error. Investigate a generic way to handle these.
As below type of situation. When spinning up lots of instances, and facing rate-limiting, bang should gracefully acknowledge the rate-limiting, and slow down or pause, then resume.
Process ServerDeployer: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(_self._args, _self._kwargs) File "/usr/local/lib/python2.7/dist-packages/bang/deployers/deployer.py", line 66, in run self.deploy() File "/usr/local/lib/python2.7/dist-packages/bang/deployers/deployer.py", line 40, in deploy action() File "/usr/local/lib/python2.7/dist-packages/bang/deployers/cloud.py", line 112, in create security_groups=self.security_groups, File "/usr/local/lib/python2.7/dist-packages/bang/providers/hpcloud/init.py", line 74, in create_server s = super(HPNova, self).create_server(_args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/bang/providers/openstack/init.py", line 210, in create_server _kwargs File "/usr/local/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 590, in create _boot_kwargs) File "/usr/local/lib/python2.7/dist-packages/novaclient/v1_1/base.py", line 162, in _boot return_raw=return_raw, _kwargs) File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 145, in _create _resp, body = self.api.client.post(url, body=body) File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 230, in post return self._cs_request(url, 'POST', _kwargs) File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 214, in _cs_request _kwargs) File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 196, in _time_request resp, body = self.request(url, method, _kwargs) File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 190, in request raise exceptions.from_response(resp, body, url, method) OverLimit: This request was rate-limited