Passing list to volume filter doesn't work

Bug #1403875 reported by Avishay Traeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Avishay Traeger

Bug Description

The db code already allows searching for a value in a list, for example, id in [id1, id2, id3]. The problem is when we get the value at the API it comes as a string and therefore the filter fails.

Changed in cinder:
assignee: nobody → Avishay Traeger (avishay-il)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/142790
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4aaf40ba1aab4d7c347b05750d0fe21f8d1bcc68
Submitter: Jenkins
Branch: master

commit 4aaf40ba1aab4d7c347b05750d0fe21f8d1bcc68
Author: Avishay Traeger <email address hidden>
Date: Thu Dec 18 14:55:26 2014 +0100

    Fix issue with passing lists in filters

    The Cinder db code already allows searching for a value in a list,
    for example, id in ['id1', 'id2', 'id3']. The problem is when we
    get the value at the API it comes as a string (e.g.
    "['id1', 'id2', 'id3']", and therefore the filter fails. This was
    already fixed for metadata filters, so just apply it to all filters.

    We do a try/except because if it really is a string, then the
    literal_eval will fail because we don't pass double quotes, such as
    "'string'". The current code therefore will now cover lists and
    fall back to the original behavior for strings.

    Change-Id: Idfd8298401a330bb99ddcd130268fabb6ef9d162
    Closes-Bug: 1403875

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/144293

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/juno)

Change abandoned by Mike Perez (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/144293
Reason: Over a month with no update.

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.