test_list_images fails

Bug #940532 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Daryl Walleck

Bug Description

This test seems to think that there should be a 'instance_ref' metadata key but there is not. I don't know if this test is buggy or some unknown (to me) spec about the metadata is being violated by nova.

======================================================================
ERROR: The list of servers should be filtered by server ref
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/cygdrive/c/source/tempest/tempest/tests/test_list_images.py", line 129, in test_list_images_filter_by_server_ref
    params = {'server': self.image3['metadata']['instance_ref']}
KeyError: 'instance_ref'

======================================================================
ERROR: Detailed list of servers should be filtered by server ref
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/cygdrive/c/source/tempest/tempest/tests/test_list_images.py", line 213, in test_list_images_with_detail_filter_by_server_ref
    params = {'server': self.image3['metadata']['instance_ref']}
KeyError: 'instance_ref'

Revision history for this message
Daryl Walleck (dwalleck) wrote :

It was my understanding that this is a core feature of glance, which may be incorrect. Let me check with my devs and I'll adjust the test if needed.

Changed in tempest:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Daryl Walleck (dwalleck)
milestone: none → essex-4
Revision history for this message
Jay Pipes (jaypipes) wrote :

This is actually not a Glance thing (Glance has no concept of an image_ref) AFAIK, this is solely the realm of the Compute API, which has an imageRef (not image_ref) key in the *Request* dictionary sent to the Create Servers call:

http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html

I don't believe that image_ref is used anywhere else.

So, looks to me like the test is simply wrong.

Revision history for this message
David Kranz (david-kranz) wrote :

Jay, I think you mean these two cases should just be removed, right?

Revision history for this message
Daryl Walleck (dwalleck) wrote :

The purpose of these tests is to test the server filter parameter for list images, which is documented functionality. My environment is obviously different, so I can just rewrite where the server ref is coming from.

Revision history for this message
Daryl Walleck (dwalleck) wrote :

Turns out the server_ref field was moved from metatdata of an image to an actual property of the image.

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

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

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

Reviewed: https://review.openstack.org/4523
Committed: http://github.com/openstack/tempest/commit/97d751748d0d59d2f767ccd5eadc51c961127d82
Submitter: Jenkins
Branch: master

commit 97d751748d0d59d2f767ccd5eadc51c961127d82
Author: Daryl Walleck <email address hidden>
Date: Fri Feb 24 18:54:10 2012 -0600

    Fixes lp#940532

    * Changes image filter by server_ref tests since
      the location of the property was modified

    Change-Id: I3dc55323402b766d6b12df8660e35b8bf2b16112

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
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.