nova-manage db online_data_migrations can fail with UnicodeEncodeError if there are duplicate aggregates or flavors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Newton |
Confirmed
|
Medium
|
Matt Riedemann |
Bug Description
This was found purely through code inspection, but the online data migration to move aggregates to the nova API database has a problem here:
The problem is the AggregateNameExists exception message is translatable and could be in unicode characters, and when casting that to str() in python 2.7 it results in a UnicodeEncodeError:
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> msg = u'\xF0\x9F\x92\xA9'
>>> msg
u'\xf0\x9f\x92\xa9'
>>> str(msg)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
summary: |
nova-manage db online_data_migrations can fail with UnicodeEncodeError - if there are duplicate aggregates + if there are duplicate aggregates or flavors |
I've marked this as High severity because anyone that hits this is going to be blocked on running their online data migrations.