Description of problem: Can not create cinder snapshot if the description contains non-ascii code Version-Release number of selected component (if applicable): OSP8 How reproducible: 100% Steps to Reproduce: 1. Create a cinder volume 2. Create a snapshot based on that volume and fill in the description using some Japanese words 3. Actual results: 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher [req-aac877ea-3042-4db9-a45b-15153903317c 2ca1a257e7e348aa9e21162c74e0691b 60593a55518a41168555751afb3cb97e - - -] Exception during message handling: 'ascii' codec can't encode characters in position 111-113: ordinal not in range(128) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last): 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher executor_callback)) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher executor_callback) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 102, in wrapper 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher info["function"]["kwargs"] = str(kwargs) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher UnicodeEncodeError: 'ascii' codec can't encode characters in position 111-113: ordinal not in range(128) 2016-10-12 01:26:50.191 27761 ERROR oslo_messaging.rpc.dispatcher Expected results: Additional info:
The backport here should resolve this issue, but the issue will still occur if osprofiler has been enabled for cinder by setting [profiler] profiler_enabled=True in cinder.conf.
Reproduces with: # cinder create 1 # cinder snapshot-create --description 角 <id>
Hi Eric, Sorry for a general question: we do support the non-ascii characters for the resource names and description in OSP, am I right ? So if there is something wrong with encode/decode for other components I should also file bugzilla right ? Best Regards, Chen
(In reply to Chen from comment #3) > Sorry for a general question: we do support the non-ascii characters for the > resource names and description in OSP, am I right ? So if there is something > wrong with encode/decode for other components I should also file bugzilla > right ? > Yes, anywhere this fails should be considered a bug. Thanks, Eric
Tested using: openstack-cinder-7.0.3-1.el7ost.noarch Verification flow: [stack@undercloud-0 ~]$ cinder create 1 +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2016-12-06T09:46:02.000000 | | description | None | | encrypted | False | | id | 6c05b8b6-f154-4610-9ec2-2235e97ebe03 | | metadata | {} | | migration_status | None | | multiattach | False | | name | None | | os-vol-host-attr:host | None | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | 3ad530b2f760496eb7865912ebc3b83b | | os-volume-replication:driver_data | None | | os-volume-replication:extended_status | None | | replication_status | disabled | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | user_id | 7acdf736904e4e0fa208119399a21319 | | volume_type | None | +---------------------------------------+--------------------------------------+ [stack@undercloud-0 ~]$ cinder list +--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+ | ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to | +--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+ | 6c05b8b6-f154-4610-9ec2-2235e97ebe03 | available | - | - | 1 | - | false | False | | +--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+ [stack@undercloud-0 ~]$ cinder snapshot-create 6c05b8b6-f154-4610-9ec2-2235e97ebe03 --description 角スナップショ +-------------+--------------------------------------+ | Property | Value | +-------------+--------------------------------------+ | created_at | 2016-12-06T09:47:01.408544 | | description | 角スナップショ | | id | c09a52f0-84a4-48af-b90a-d79c074ff8e9 | | metadata | {} | | name | None | | size | 1 | | status | creating | | volume_id | 6c05b8b6-f154-4610-9ec2-2235e97ebe03 | +-------------+--------------------------------------+ [stack@undercloud-0 ~]$ cinder snapshot-list +--------------------------------------+--------------------------------------+-----------+------+------+ | ID | Volume ID | Status | Name | Size | +--------------------------------------+--------------------------------------+-----------+------+------+ | c09a52f0-84a4-48af-b90a-d79c074ff8e9 | 6c05b8b6-f154-4610-9ec2-2235e97ebe03 | available | - | 1 | +--------------------------------------+--------------------------------------+-----------+------+------+ [stack@undercloud-0 ~]$ cinder snapshot-show c09a52f0-84a4-48af-b90a-d79c074ff8e9 +--------------------------------------------+--------------------------------------+ | Property | Value | +--------------------------------------------+--------------------------------------+ | created_at | 2016-12-06T09:47:01.000000 | | description | 角スナップショ | | id | c09a52f0-84a4-48af-b90a-d79c074ff8e9 | | metadata | {} | | name | None | | os-extended-snapshot-attributes:progress | 100% | | os-extended-snapshot-attributes:project_id | 3ad530b2f760496eb7865912ebc3b83b | | size | 1 | | status | available | | volume_id | 6c05b8b6-f154-4610-9ec2-2235e97ebe03 | +--------------------------------------------+--------------------------------------+
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2991.html
Hi, I'm getting the same error in my RHOSP 16.2. [root@overcloud-controller-0 /]# rpm -qa|grep openstack-cinder openstack-cinder-15.6.1-2.20210528143333.el8ost.3.noarch [root@overcloud-controller-0 /]#