DescribeInstances reply is not ordered as in EC2

Bug #827619 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Russell Bryant

Bug Description

This is probably not documented api behavior in EC2, but against ec2, 'euca-describe-instances' returns the list of instances in chronological-order by the instance start time.

Against openstack:
$ euca-describe-instances
RESERVATION r-hm0g1p5n smoser_project default
INSTANCE i-000000c8 ami-00000017 10.55.60.8 10.55.60.8 running mykey 0m1.large 2011-08-16T19:37:19Z nova
RESERVATION r-d0n8ifhf smoser_project default
INSTANCE i-000000ca ami-00000017 10.55.60.12 10.55.60.12 running mykey 0m1.small 2011-08-16T20:01:33Z nova
RESERVATION r-txxl8iri smoser_project default
INSTANCE i-000000c6 ami-00000011 91.189.93.89 10.55.60.6 running mykey 0m1.large 2011-08-16T18:18:57Z nova

Against EC2:
$ euca-describe-instances
RESERVATION r-e746d088 950047163771 default
INSTANCE i-7d75081c ami-fdc50494 stopped brickies0 m1.large 2011-08-10T08:23:57.000Z us-east-1c aki-825ea7eb
RESERVATION r-f1660a9e 950047163771 default
INSTANCE i-b35300d2 ami-7134f518 terminated brickies 0 t1.micro 2011-08-16T18:43:21.000Z us-east-1c aki-825ea7eb
RESERVATION r-0d422e62 950047163771 default
INSTANCE i-6b97c40a ami-7b35f412 ec2-184-73-50-204.compute-1.amazonaws.com ip-10-83-10-102.ec2.internal running brickies 0 m1.small 2011-08-16T19:29:38.000Z us-east-1c aki-805ea7e9
smoser@brickies:~$ euca-terminate-instances i-6b97c40a
INSTANCE i-6b97c40a

Note, above that in EC2, the most recently launched instance is shown last.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
summary: - DescribeInstances reply is not ordered correctly
+ DescribeInstances reply is not ordered as in EC2
Revision history for this message
Vish Ishaya (vishvananda) wrote :

this could easily be done with a sort.

Changed in nova:
milestone: none → essex-rc1
Changed in nova:
assignee: nobody → Russell Bryant (russellb)
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/5200

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/5200
Committed: http://github.com/openstack/nova/commit/a3a7464a8de96e219f40049fdd03b41cb8eb65ca
Submitter: Jenkins
Branch: master

commit a3a7464a8de96e219f40049fdd03b41cb8eb65ca
Author: Russell Bryant <email address hidden>
Date: Sat Mar 10 13:12:27 2012 -0500

    Sort results from describe_instances in EC2 API.

    Fix bug 827619.

    This bug pointed out that EC2 sorts the results of of describe_instances
    by the launch time. Make our implementation of the EC2 API behave the same
    way. Previously, instances coming out of the db API were sorted by the
    key we wanted, but in the opposite order. You can now specify both a
    sort key and order. The behavior is the same by default, but the EC2
    API sets the parameter to do an ascending sort.

    Change-Id: Ifd0bc79ad4c4c8c45809dbb1ac2dadf8abcfd4c3

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
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.