libvirt: properly decode error message from qemu guest agent
Some of error messages from qemu-guest-agent is
localized encoding.
We may get GB2312(Chinese charactors) from qga's error message
from a Chinese version of Windows.
nova didn't cover this senario, we may get errors like: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6
in position 138: ordinal not in range(128)
This patch will fix this issue by exception_to_unicode
Reviewed: https:/ /review. openstack. org/517727 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7687dadccff 52c9354033137e4 f5ebdeb79b2424
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 7687dadccff52c9 354033137e4f5eb deb79b2424
Author: Chen Hanxiao <email address hidden>
Date: Thu Oct 12 18:52:42 2017 +0800
libvirt: properly decode error message from qemu guest agent
Some of error messages from qemu-guest-agent is
localized encoding.
We may get GB2312(Chinese charactors) from qga's error message
from a Chinese version of Windows.
nova didn't cover this senario, we may get errors like:
UnicodeDecodeE rror: 'ascii' codec can't decode byte 0xe6
in position 138: ordinal not in range(128)
This patch will fix this issue by exception_ to_unicode
Closes-bug: #1727643
Change-Id: I3b8bfaec8af0e9 b4859dcfe7e35fc 5bb26c208dc db551c8d193a7b0 8e8b59ef9d)
Signed-off-by: Chen Hanxiao <email address hidden>
(cherry picked from commit 13418faa17e1034