| Verb | URI | RegEx | Default | ||
| POST | * | .* | 10/min | ||
| POST | */servers | ^/servers | 50/ | ||
$ python performance-single-cs.py -v -t 1 -s 13 -u user -k key run | tee log.$(date +%s).txt
Traceback (most recent call last):
File "performance-single-cs.py", line 349, in module
Main().run()
File "performance-single-cs.py", line 346, in run
self.test_performance(user,key, sample, cs_count, timeout)
File "performance-single-cs.py", line 298, in test_performance
t.test_multi_cs_perf(sample, cs_count, timeout)
File "performance-single-cs.py", line 250, in test_multi_cs_perf
cs_records=self.cs_create_all(cs_count, i+1)
File "performance-single-cs.py", line 225, in cs_create_all
server=self.cs_create(k, sample_nr)
File "performance-single-cs.py", line 178, in cs_create
server=sm.create(name, image, flavor)
File "/usr/lib/pymodules/python2.7/cloudservers/servers.py", line 172, in create
return self._create("/servers", body, "server")
File "/usr/lib/pymodules/python2.7/cloudservers/base.py", line 26, in _create
resp, body = self.api.client.post(url, body=body)
File "/usr/lib/pymodules/python2.7/cloudservers/client.py", line 69, in post
return self._cs_request(url, 'POST', **kwargs)
File "/usr/lib/pymodules/python2.7/cloudservers/client.py", line 50, in _cs_request
resp, body = self.request(self.management_url + url, method, **kwargs)
File "/usr/lib/pymodules/python2.7/cloudservers/client.py", line 37, in request
raise exceptions.from_response(resp, body)
cloudservers.exceptions.OverLimit: Too many requests... (HTTP 413)
A naive code that was used in the first version of my program was simply trying to sent as many create requests as possible. This of course is not going to work if we increase servers above the allowed limit.
Code demonstration
An exaple of the naive code.
A code that is more inteligent looks like this.
References
No comments:
Post a Comment