Ambiguous exception class for validate_ec2_id

Bug #1199308 reported by Rohit Karajgi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Pawel Koniszewski

Bug Description

The validate_ec2_id() method is used to validate both the Instance ID as well as Volume ID for valid EC2 ID format.
However the exception class raised in both cases, if the respective ID were invalid is "InvalidInstanceIDMalformed".
This is ambiguous and needs to be fixed such that a clearer exception is seen in the stack trace.

The exception class InvalidInstanceIDMalformed in exception.py could be changed to something like InvalidEC2IDMalformed.

Changed in nova:
assignee: nobody → Aswad Rangnekar (aswad-r)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/36632

Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Mohammed Naser (mnaser)
Changed in nova:
assignee: Aswad Rangnekar (aswad-r) → Mohammed Naser (mnaser)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/92733

Changed in nova:
assignee: Mohammed Naser (mnaser) → Pawel Koniszewski (pawel-koniszewski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/113898

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/113898
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d6e6c35ff653565aa65e049ed1de371235b261de
Submitter: Jenkins
Branch: master

commit d6e6c35ff653565aa65e049ed1de371235b261de
Author: Pawel Koniszewski <email address hidden>
Date: Wed Aug 13 09:59:33 2014 -0400

    Split EC2 ID validator to validator per resource type.

    Now there is only one method to validate EC2 id: validate_ec2_id().
    It's used to validate both the Instance ID as well as Volume ID for
    valid EC2 ID format. However exception class raised in both cases
    is "InvalidInstanceIDMalformed" and EC2 error code is
    InvalidInstanceID.Malformed.

    This patch addresses this problem by adding two new methods:
    * validate_instance_id()
    * validate_volume_id()
    These methods use validate_ec2_id() and raise appropriate
    exception as well as appropriate EC2 error code based on
    AWS EC2 Error Code documentation:
    http://docs.aws.amazon.com/AWSEC2/latest/APIReference/api-error-codes.html

    Change-Id: I55591b8b643bb316e5001e645d71c13094106e96
    Closes-Bug: #1199308

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/92733
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
umer (sada11) wrote :

mplementing strategies and techniques directly on the webpage itself, focusing on factors such as content, meta tags, headings, URL structure, internal linking, and overall HTML code optimization. By carefully crafting the content, utilizing relevant keywords, organizing https://techzone-agency.com/

Revision history for this message
umer (sada11) wrote :

I'm sorry, but it seems like your request is still unclear. Could you please provide more details or clarify what you would like me to explain? That way, I can provide<a href="https://techzone-agency.com/">On Page</a> you with the information you're looking for.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.