Metadata keys are not case sensitive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Low
|
Rajesh Tailor |
Bug Description
[Summary]
Unexpected API Error returned when set metadata for aggregate
[Topo]
devstack all-in-one node
[Description and expect result]
no Unexpected API Error returned when set metadata for aggregate
[Reproduceable or not]
reproduceable
[Recreate Steps]
On devstack:
> nova aggregate-create agg1
> nova aggregate-
> nova aggregate-
1) create an aggregate, with metadata "abc":
root@45-59:~# nova aggregate-details agg1
+----+-
| Id | Name | Availability Zone | Hosts | Metadata |
+----+-
| 4 | agg1 | - | | 'abc=1' |
+----+-
root@45-59:~#
2)set metadata of the aggregate as "ABC", upper case of the
existing metadata "abc", an Unexpected API Error returned:
root@45-59:~# nova aggregate-
ERROR (ClientException): Unexpected API Error. Please report
this at http://
log if possible.<type 'exceptions.
req-b45dddb2-
root@45-59:~#
[Configration]
reproduceable bug, no need
[logs]
reproduceable bug, no need
[Root cause anlyze or debug inf]
reproduceable bug
[Attachment]
None
tags: | added: db |
description: | updated |
Changed in nova: | |
assignee: | nobody → Augustina Ragwitz (auggy) |
Changed in nova: | |
status: | Triaged → In Progress |
tags: | added: api |
Changed in nova: | |
assignee: | Augustina Ragwitz (auggy) → nobody |
Changed in nova: | |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | nobody → Augustina Ragwitz (auggy) |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | Augustina Ragwitz (auggy) → nobody |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | Augustina Ragwitz (auggy) → Rajesh Tailor (ratailor) |
Changed in nova: | |
assignee: | Rajesh Tailor (ratailor) → nobody |
Changed in nova: | |
assignee: | nobody → Nalini Varshney (varshneyg) |
Changed in nova: | |
importance: | Medium → Low |
Changed in nova: | |
assignee: | Nalini Varshney (varshneyg) → Rajesh Tailor (ratailor) |
I was able to reproduce this behavior following the steps above and also by modifying data in the functional tests. This only happens when you have two keys of the same name where one is lowercase and one is uppercase. I looked at the aggregate code and didn't see any obvious normalization or modification of keys, so I suspect this may be something in the db layer (possibly oslo?) that is normalizing the key values. That being said, this seems like a pretty extreme edge case so unless someone can share a situation where this is a huge deal, this will most likely be a low priority bug. At minimum, we might need a documentation patch to indicate that metadata keys must be case-insensitively uniquely named.