← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1352193] Re: The nova API service can’t hand image metadata properly when metadata key contains uppercase letter

 

from following result

jichen@cloudcontroller:~$ glance image-update --property Key1=Value2 --purge-props 64f067bd-ce03-4f04-a354-7188a4828e8e
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| Property 'key1'  | Value2                               |


I think we need to confirm with glance whether they only accept lower case key/value pair
if that's the case, nova should be updated in order to fit for that restriction


** Project changed: nova => glance

** Also affects: nova
   Importance: Undecided
       Status: New

** Changed in: nova
       Status: New => Confirmed

** Changed in: nova
     Assignee: (unassigned) => jichenjc (jichenjc)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1352193

Title:
  The nova API service can’t hand image metadata properly when metadata
  key contains uppercase letter

Status in OpenStack Image Registry and Delivery Service (Glance):
  Confirmed
Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  OS: centos 6.5 64bit
  openstack release: icehouse

  Steps to reproduce:
  1. Call the image metadata API of nova using the following command:
   curl -X 'POST' -v http://IP:PORT/v2/${tenant_id}/images/${image_id}/metadata -H "X-Auth-Token: $token" -H 'Content-type: application/json' -d '{"metadata":{"Key1":"Value1"}}' | python -mjson.tool
  2. Execute the above command again:
    curl -X 'POST' -v http://IP:PORT/v2/${tenant_id}/images/${image_id}/metadata -H "X-Auth-Token: $token" -H 'Content-type: application/json' -d '{"metadata":{"Key1":"Value1"}}' | python -mjson.tool

  Expected result:
  In step1, the json response should be:
    {"metadata":{"Key1":"Value1"}}
  In setp2, the json response should be:
   {"metadata":{"Key1":"Value1"}}

  Observed result: 
  In step1, the json response is:
    {"metadata":{"key1":"Value1"}}
  In setp2, the json response is:
   {"metadata":{"key1":"Value1,Value1"}}

  Besides, we can observer that each image metadata key in table
  image_properties of glance DB is converted to lowercase even if the
  key user inputted contains uppercase letter.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1352193/+subscriptions


References