Cannot search volumes by meta-data

Bug #1195015 reported by Mathieu Gagné
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Seif Lotfy

Bug Description

The metadata parameter is urlencoded (to string) by cinderclient but isn't decoded back to dict by the API.

This prevents the search of volumes by meta-data.

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/34609

Changed in cinder:
assignee: nobody → Mathieu Gagné (mgagne)
status: New → In Progress
Revision history for this message
Mathieu Gagné (mgagne) wrote :

I wish this bugfix to be backported to Grizzly.

Mathieu Gagné (mgagne)
Changed in python-cinderclient:
assignee: nobody → Mathieu Gagné (mgagne)
Revision history for this message
Seif Lotfy (seif) wrote :

Are you still working on it or can I take over? I have a working which uses your unit tests :D

Revision history for this message
Mathieu Gagné (mgagne) wrote :

Sorry for the delay. I'm about to propose a new approach. Feel free to comment or challenge my proposition.

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

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

Changed in python-cinderclient:
status: New → In Progress
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/38062

Changed in cinder:
assignee: Mathieu Gagné (mgagne) → Seif Lotfy (seif)
Revision history for this message
Seif Lotfy (seif) wrote :

Hey Mathieu,
Thanks a lot for taking up on this, I also think search volumes by meta-data is a crucial feature.
That being said I would like to challenge your approach to this.

sending 'metadata': {'tag': 'looloo', 'desc': 'foobar'}
should be encoded to
?metadata=%7B%27tag%27%3A+%27looloo%27%2C+%27desc%27%3A+%27foobar%27%7D

What is wrong with that. It is easy translated back and the cinder side can handle it
What am I missing

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

Reviewed: https://review.openstack.org/38062
Committed: http://github.com/openstack/cinder/commit/76fc407382315a97cc020e8592199609b3a6a8e9
Submitter: Jenkins
Branch: master

commit 76fc407382315a97cc020e8592199609b3a6a8e9
Author: Mathieu Gagné <email address hidden>
Date: Wed Jun 26 16:27:43 2013 -0400

    Fix volumes search by metadata

    The metadata parameter is urlencoded (to string) by cinderclient
    but isn't decoded back to dict by the API.

    The metadata parameter needs to be converted back to dict
    to be of any use by the filters parameter of get_all().

    The original implementation has been done by:
    Mathieu Gagne <email address hidden>

    Fixes: bug #1195015

    Change-Id: I19d7d386afddddc067e9f4ef86967c9b72d9e530

Changed in cinder:
status: In Progress → Fix Committed
Mathieu Gagné (mgagne)
no longer affects: python-cinderclient
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-3 → 2013.2
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.