Bug in Glance Simple DB while applying filters on properties

Bug #1259227 reported by Hemanth Makkapati
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Hemanth Makkapati

Bug Description

This bug in simple db fails to filter images based on extra properties when images have more on than one extra properties. At the following location in simple db code, a dict is created for each extra property. This overwrites the previous properties and the resultant dict ends up holding only the last extra property. As a result, this works only when the images have exactly one extra property.
https://github.com/openstack/glance/blob/master/glance/db/simple/api.py#L280

This bug can be reproduced by adding a second extra property to one of the fixtures used in unit tests at https://github.com/openstack/glance/blob/master/glance/tests/unit/v2/test_images_resource.py#L142.

Changed in glance:
assignee: nobody → Hemanth Makkapati (hemanth-makkapati)
Changed in glance:
importance: Undecided → Low
status: New → Triaged
Changed in glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/60908
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=97e281dae4a50ed1ec71a96814508dcb76359d96
Submitter: Jenkins
Branch: master

commit 97e281dae4a50ed1ec71a96814508dcb76359d96
Author: Hemanth Makkapati <email address hidden>
Date: Mon Dec 9 13:15:50 2013 -0500

    Fix simple-db image filtering on extra properties

    This fixes a bug in simple DB that causes filtering of images based on
    extra-properties to fail. The current code works only when an image has no
    extra-properties or exactly one. The current test suite doesn't include a test
    that tries to filter images based on more than one extra-property.

    Also, added both functional and unit tests to test image list with filters
    using more than one extra-property.

    Fixes bug: 1259227
    Change-Id: I4c0d294585235dacbf154bf0df5d1e7c4a172cdd

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-2 → 2014.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.