For euca-describe-instances invalid instance id is not getting validated

Bug #1050225 reported by Vijaya Erukala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Vijaya Erukala

Bug Description

$euca-describe-instances i-00000055
RESERVATION r-0bq9vf8v 52275ff423254cd19d56aa94b33f729d default
INSTANCE i-00000055 ami-00000001 172.24.4.227 novdemob0ii0--onhost--nv-aw1st running testkey 0 m1.tiny 2012-09-13T11:09:28.000Z nova aki-00000002 ari-00000003 monitoring-disabled 172.24.4.227 10.0.0.3 instance-store

$ euca-describe-instances i-00000056

$ euca-describe-instances i-00000055 i-00000056 >>>>invalid instance id
RESERVATION r-0bq9vf8v 52275ff423254cd19d56aa94b33f729d default
INSTANCE i-00000055 ami-00000001 172.24.4.227 novdemob0ii0--onhost--nv-aw1st running testkey 0 m1.tiny 2012-09-13T11:09:28.000Z nova aki-00000002 ari-00000003 monitoring-disabled 172.24.4.227 10.0.0.3 instance-store

euca-describe-instances should get an error response from the API server if an invalid instance ID is supplied along with the proper instance id details if request has both valid and invalid instance id

Tags: ec2
Changed in nova:
assignee: nobody → Vijaya Erukala (vijaya-erukala)
description: updated
Michael Still (mikal)
Changed in nova:
importance: Undecided → Medium
status: New → Triaged
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/12937

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Vijaya Erukala (vijaya-erukala) wrote :

New output format:

euca-describe-instances i-00000045 i-00000012
RESERVATION r-16epayoe 4b8378b8f1a245e2aa1f3b77761bfe5e default
INSTANCE i-00000012 ami-00000001 172.24.4.227 novdemob0ii0--onhost--nv-aw1st running testkey 0 m1.tiny 2012-09-21T17:40:48.000Z nova aki-00000002 ari-00000003 monitoring-disabled 172.24.4.227 10.0.0.10 instance-store
RESERVATION Instance i-00000045 does not exist
INSTANCE i-00000045 does not exist monitoring-disabled
INSTANCE i-00000045 does not exist monitoring-disabled

Also changed the euca.sh script in devstack repository to support the new change
please find the change at https://review.openstack.org/#/c/13460/

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Is this implemented in any of the other ec2 apis (eucalyptus, ec2)? I don't think it makes sense to come up with our own syntax for this.

Changed in nova:
status: In Progress → Incomplete
Revision history for this message
Vijaya Erukala (vijaya-erukala) wrote :

 Hi Vish,not sure if this answer your question from one of the bug from eucalyptus(https://eucalyptus.atlassian.net/browse/EUCA-2346) I found this

 There are two different responses from AWS depending on the type of error:

1) If you specify an instance ID that could not ever be valid (as in Patrick's example of 'zzzzzzzz'), you get this code: InvalidInstanceID.Malformed

2) If you specify an instance ID that could be valid (i.e., conforms to the specification of an instance ID), you also get a 400 HTTP status, but you get this response:

<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-abcdabcd' does not exist</Message></Error></Errors><RequestID>29aec988-c656-49f0-9a26-242a19c1b4d1</RequestID></Response>

In both cases, Eucalyptus simply returns an empty set.
The above link talks about the scenario when user tries to get details for one instance

but as per Openstack euca-describe-instances accepts multiple values as input and if user req euca-describe-instances with
both valid and invalid id's then the details of the only valid instances are being displayed and <invalid or non-exsiting> id's are ignored silently.
How can an end user can be notified in the above case?

tags: added: ec2
Revision history for this message
Vish Ishaya (vishvananda) wrote :

I think that someone should try running a multiple describe against ec2 with one valid id. We should emulate that behavior

Thierry Carrez (ttx)
Changed in nova:
status: Incomplete → Confirmed
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.