yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60138
[Bug 1653261] [NEW] nova-manage db online_data_migrations can fail with UnicodeEncodeError if there are duplicate aggregates
Public bug reported:
This was found purely through code inspection, but the online data
migration to move aggregates to the nova API database has a problem
here:
https://github.com/openstack/nova/blob/a74d3ae4e815e3727961ef67bd801dada0267a0b/nova/objects/aggregate.py#L596
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)
** Affects: nova
Importance: High
Assignee: Matt Riedemann (mriedem)
Status: Triaged
** Affects: nova/newton
Importance: High
Assignee: Matt Riedemann (mriedem)
Status: Confirmed
** Tags: i18n nova-manage upgrades
** Also affects: nova/newton
Importance: Undecided
Status: New
** Changed in: nova
Status: New => Triaged
** Changed in: nova/newton
Status: New => Confirmed
** Changed in: nova
Importance: Undecided => Medium
** Changed in: nova/newton
Importance: Undecided => Medium
** Changed in: nova
Assignee: (unassigned) => Matt Riedemann (mriedem)
** Changed in: nova/newton
Assignee: (unassigned) => Matt Riedemann (mriedem)
** Tags added: i18n nova-manage upgrades
** Changed in: nova
Importance: Medium => High
** Changed in: nova/newton
Importance: Medium => High
--
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/1653261
Title:
nova-manage db online_data_migrations can fail with UnicodeEncodeError
if there are duplicate aggregates
Status in OpenStack Compute (nova):
Triaged
Status in OpenStack Compute (nova) newton series:
Confirmed
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:
https://github.com/openstack/nova/blob/a74d3ae4e815e3727961ef67bd801dada0267a0b/nova/objects/aggregate.py#L596
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1653261/+subscriptions
Follow ups