← 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

 

The glance v1 API which the Nova images proxy is based on put metadata
via headers. That means they are case insensitive. Nova will continue to
do this regardless of backend, which means when talking to a v2 server,
your metadata might be wrong.

The Nova image proxy should not be used, and Glance should be interacted
with directly.

** Changed in: nova
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
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 Glance:
  In Progress
Status in OpenStack Compute (nova):
  Won't Fix

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