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/511459 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=13418faa17e 1034db551c8d193 a7b08e8b59ef9d
Committed: https:/
Submitter: Zuul
Branch: master
commit 13418faa17e1034 db551c8d193a7b0 8e8b59ef9d
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
Signed-off-by: Chen Hanxiao <email address hidden>