OpenStack Compute (Nova)

Supporting EC2 Error Codes

Registered by Attila Fazekas on 2012-11-19

The EC2 API has well defined Error Codes, which are usable by programs to take corrective action.
Without correct EC2 Error Codes it is very difficult to use the EC2 API.
'UnknownError' and 'EC2APIError' are really *not* useful.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Medium
Drafter:
Attila Fazekas
Direction:
Approved
Assignee:
Jakub Ruzicka
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Jakub Ruzicka on 2013-03-14
Completed by
Russell Bryant on 2013-09-04

Related branches

Sprints

Whiteboard

Any chance of getting this in grizzly? --Vish

This will very likely go into Havana. Patch is ready, it's just a matter of splitting it so that it's easy enough to review.

Gerrit topic: https://review.openstack.org/#q,topic:bp/ec2-error-codes,n,z

Addressed by: https://review.openstack.org/21344
    Improve EC2 error response code.

Addressed by: https://review.openstack.org/28330
    Improve EC2 API error responses.

Addressed by: https://review.openstack.org/37243
    Fix malformed format string.

Addressed by: https://review.openstack.org/37548
    Fix and unify EC2 API error response generation.

Addressed by: https://review.openstack.org/37549
    Improve EC2 API error responses.

Addressed by: https://review.openstack.org/38642
    Refactor EC2 API error handling code.

Addressed by: https://review.openstack.org/40267
    Improve EC2 API error responses

Addressed by: https://review.openstack.org/40900
    Fix EC2 API Fault wrapper

Addressed by: https://review.openstack.org/41746
    Make InvalidInstanceIDMalformed an EC2 exception

Addressed by: https://review.openstack.org/41747
    Improve parameter related EC2 error codes

Addressed by: https://review.openstack.org/41748
    Introduce Invalid* EC2 error codes

Addressed by: https://review.openstack.org/41749
    Introduce AuthFailure EC2 error code

Addressed by: https://review.openstack.org/41750
    Introduce IncorrectState EC2 error code

Addressed by: https://review.openstack.org/41751
    Introduce UnsupportedOperation EC2 error code

Addressed by: https://review.openstack.org/41752
    Introduce SecurityGroupLimitExceeded EC2 error code

Addressed by: https://review.openstack.org/41753
    Introduce InternalError EC2 error code

Addressed by: https://review.openstack.org/41754
    Improve EC2 API error responses

Addressed by: https://review.openstack.org/43761
    Remove EC2 postfix from InvalidInstanceIDMalformedEC2

Addressed by: https://review.openstack.org/43762
    Introduce InvalidPermissionDuplicate EC2 error code

(?)

Work Items

Work items:
Use the exception class name instead of the UnknownError: DONE
Modify the Executor according to Code Changes part: DONE
Replace the EC2APIErrors: DONE
Add attributes to the existing exceptions: DONE
Modify the unit tests to do not allow incorrect EC2 Error Codes: DONE
Modify the unit tests to verify the correct EC2 Error Code: DONE
Fix the Server (faults.py) EC2 Error Codes: DONE

This blueprint contains Public information 
Everyone can see this information.