The response is incorrect while creating snapshot metadata

Bug #1255917 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
huangtianhua

Bug Description

1.Create metadata for a snapshot with the request body:
{"metadata":{
             "key1": "value1",
             "KEY1": "value2"
}}

2.The server accept it, and return the response body, as bellow:
{"metadata":{
             "key1": "value1",
             "KEY1": "value2"
}}

3.Get the metadata of the snapshot, the server returned:
{"metadata":{
             "key1": "value1"
}}

4.I find that case ignore in cinder, so the server just add one metadata for the snapshot

5.So i think the response body should return the one which the server added when create action:
  {"metadata":{
             "key1": "value1"

}}

Changed in cinder:
assignee: nobody → huangtianhua (huangtianhua)
summary: - The response is incorrect while create snapshot metadata
+ The response is incorrect while creating snapshot metadata
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/59153

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/59153
Committed: http://github.com/openstack/cinder/commit/b625f558862465184dd28da7215f34c77ec1ece6
Submitter: Jenkins
Branch: master

commit b625f558862465184dd28da7215f34c77ec1ece6
Author: huangtianhua <email address hidden>
Date: Fri Nov 29 16:56:35 2013 +0800

    Fixes case insensitive for resp body

    Create metadata for a snapshot with key-value set, which key in uppercase
    and lowercase(e.g.{"key": "v1", "KEY": "V1"), the server accept the
    request and return the key-value set {"key": "v1", "KEY": "V1"}. But the
    server just add one metadata because the server is not case sensitive.

    The patch will modify the resp body with the one which the server added.

    update_all has the same ploblem.

    DocImpact
    Change-Id: I684049412a4aa84f593e970c87157c74fffdfffe
    Closes-Bug: #1255917

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