Storwize: message handling UnicodeDecodeError if ssh response stderr with non-ascii characters

Bug #1745098 reported by yixuan zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
yixuan zhang

Bug Description

Test step:
1.SVC send ssh message to storwize/svc.
2.SVC response ssh message with stderr, and there is no ascii in the stderr.
3.Storwize driver will output exception:

Jan 19 10:43:02 Daily55 cinder-volume[21535]: ERROR oslo_messaging.rpc.server [None req-21167147-9dca-4540-9428-e32d711d0ae1 admin None] Exception during message handling: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 11: ordinal not in range(128)

4.The exception will block raising exception VolumeBackendAPIException.
5.Without the exception VolumeBackendAPIException, some operation will be failed, such as migrate a volume from one pool to the other pool

yixuan zhang (yixuan-z)
Changed in cinder:
assignee: nobody → yixuan zhang (yixuan-z)
summary: - Storwize: msg holding UnicodeDecodeError if ssh response stderr with no
- ascii
+ Storwize: message handling UnicodeDecodeError if ssh response stderr
+ with no ascii
yixuan zhang (yixuan-z)
summary: Storwize: message handling UnicodeDecodeError if ssh response stderr
- with no ascii
+ with no ascii characters
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/537286

Changed in cinder:
status: New → In Progress
yixuan zhang (yixuan-z)
summary: Storwize: message handling UnicodeDecodeError if ssh response stderr
- with no ascii characters
+ with non-ascii characters
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/537286
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=0bbdc68371d001d43f07b3aa7d96b226ba6ecf17
Submitter: Zuul
Branch: master

commit 0bbdc68371d001d43f07b3aa7d96b226ba6ecf17
Author: yixuanzhang <email address hidden>
Date: Wed Jan 24 15:19:56 2018 +0800

    Storwize: avoid ascii code error for ssh response stderr

    If there are non-ascii characters in the ssh response stderr, The
    below type of message handling exception will blow up:
    UnicodeDecodeError: 'ascii' codec can't decode byte <hex val>
    in position xx:ordinal not in range(128).

    This patch uses safe_decode for the stderr to avoid the ascii code
    error.

    Change-Id: Id630391dde7149095fc258c0f0da7d9829d1388a
    Closes-Bug: 1745098

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0rc1

This issue was fixed in the openstack/cinder 12.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.