In nova/compute/utils.py function exception_to_dict truncates unicode
message to 255. However, in non-English locales, instance message may
be longer than 255 after encoding the unicode message to byte message.
Need to truncate the encoded byte message to 255, in order to ensure
db insert operation succeed.
Reviewed: https:/ /review. openstack. org/132642 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bd9c32289ff 8cf1bc67c1395ad 921c703aa4c489
Committed: https:/
Submitter: Jenkins
Branch: master
commit bd9c32289ff8cf1 bc67c1395ad921c 703aa4c489
Author: Qin Zhao <email address hidden>
Date: Tue Nov 4 16:57:45 2014 +0800
Truncate encoded instance message to 255
In nova/compute/ utils.py function exception_to_dict truncates unicode
message to 255. However, in non-English locales, instance message may
be longer than 255 after encoding the unicode message to byte message.
Need to truncate the encoded byte message to 255, in order to ensure
db insert operation succeed.
Change-Id: I70cd2d6e4590ea 95510c1ea3d5128 7f0dea14956
Closes-Bug: 1389102