yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #05778
[Bug 1203416] Re: EC2 API errors do not match spec
** Changed in: nova
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1203416
Title:
EC2 API errors do not match spec
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Using code written against the Boto client library and originally tested against EC2 I'm finding I have to retrofit all my exception handling because Nova seems to just wrap its own exceptions as EC2ResponseError, so the error codes have no resemblance to the EC2 API error codes:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/api-error-codes.html
For example, when I hit Nova quota limits and try to start new
instances I get:
File "/opt/local/nimrodg/share/nimrod/boto/ec2/connection.py", line 715, in run_instances
verb='POST')
File "/opt/local/nimrodg/share/nimrod/boto/connection.py", line 1000, in get_object
raise self.ResponseError(response.status, response.reason, body)
EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0"?>
<Response><Errors><Error><Code>TooManyInstances</Code><Message>Quota exceeded for cores,ram: Request
ed 4, but already used 80 of 80 cores</Message></Error></Errors><RequestID>req-74d2e517-c99f-43e6-bfc
1-651ef79737ff</RequestID></Response>
But I'm expecting the error code for this from an EC2 compatible API to be InstanceLimitExceeded.
Seems like it should be possible be add the equivalent ec2_api_error
string to all suitable Nova exceptions and then have Nova's EC2 API
use that where available?
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1203416/+subscriptions