The nova API service can't hand image metadata properly when metadata key contains uppercase letter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Glance |
Medium
|
Artur Malinowski | ||
| OpenStack Compute (nova) |
Low
|
Unassigned |
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://
2. Execute the above command again:
curl -X 'POST' -v http://
Expected result:
In step1, the json response should be:
{"metadata"
In setp2, the json response should be:
{"metadata"
Observed result:
In step1, the json response is:
{"metadata"
In setp2, the json response is:
{"metadata"
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.
Changed in nova: | |
assignee: | nobody → lvdongbing (dbcocle) |
tags: | added: api |
Sean Dague (sdague) wrote : | #1 |
Changed in nova: | |
status: | New → Confirmed |
assignee: | lvdongbing (dbcocle) → nobody |
importance: | Undecided → Medium |
jichenjc (jichenjc) wrote : | #2 |
from following result
jichen@
+------
| 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
affects: | nova → glance |
Changed in nova: | |
status: | New → Confirmed |
assignee: | nobody → jichenjc (jichenjc) |
jichenjc (jichenjc) wrote : | #3 |
https:/
is glance's current behavior
nova should update its code according to glance
Eddie Sheffield (eddie-sheffield) wrote : | #4 |
Seems like something which should change in Glance as well. I can see why it's it's lowercasing the key - to do a case-insensitive check on the prefix. But I don't believe it should be using the lowercased version to get the actual key.
Changed in glance: | |
assignee: | nobody → Artur Malinowski (artur-malinowski) |
status: | Confirmed → In Progress |
Dong Liu (liudong78) wrote : | #5 |
I think this can only be fixed by using glance v2 api.
jichenjc (jichenjc) wrote : | #6 |
ok, so any forecast?
wait for glance's update to make changes on nova side , thanks
summary: |
- The nova API service can’t hand image metadata properly when metadata + The nova API service can't hand image metadata properly when metadata key contains uppercase letter |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
assignee: | jichenjc (jichenjc) → nobody |
Sean Dague (sdague) wrote : | #7 |
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 |
No patch in 30 days