[openstack-dev] [nova] solving API case sensitivity issues

Jay Pipes jaypipes at gmail.com
Wed Feb 24 13:55:13 UTC 2016

On 02/24/2016 07:48 AM, Sean Dague wrote:
> We have a specific bug around aggregrate metadata setting in Nova which
> exposes a larger issue with our mysql schema.
> https://bugs.launchpad.net/nova/+bug/1538011
> On mysql the following will explode with a 500:
>> nova aggregate-create agg1
>> nova aggregate-set-metadata agg1 abc=1
>> nova aggregate-set-metadata agg1 ABC=2
> mysql (by default) treats abc == ABC. However the python code does not.
> We have a couple of options:
> 1) make the API explicitly case fold
> 2) update the mysql DB to use latin_bin collation for these columns
> 3) make this a 400 error because duplicates were found
> Options 1 & 2 make all OpenStack environments consistent regardless of
> backend.
> Option 2 is potentially expensive TABLE alter.
> Option 3 gets rid of the 500 error, however at the risk that the
> behavior for this API is different depending on DB backend. Which is
> less than ideal.
> My preference is slightly towards #1. It's taken a long time for someone
> to report this issue, so I think it's an edge case, and people weren't
> think about this being case sensitive. It has the risk of impacting
> someone on an odd db platform that has been using that feature.

Agreed, #1 is my preference, even though I shake my fist at MySQL being 
so dumb in this regard.


More information about the OpenStack-dev mailing list