Hide Forgot
Description of problem: If a snapshot is created from volume with names containing some unicode letters (spanish, french, german), a TRACE is generated and snapshot fails ... 2016-02-17 09:05:09.898 14856 ERROR oslo_messaging.rpc.dispatcher [req-23defc6f-6d21-4fb5-8d36-b887cbd5a19c dc6cf5b7300643f3b1b59dfc8fa08d0f 41703e14258949c2a2dac3d5c07eb17c - - -] Exception during message handling: 'ascii' codec can't encode characters in position 125-126: ordinal not in range(128) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last): 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher executor_callback)) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher executor_callback) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 102, in wrapper 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher info["function"]["kwargs"] = str(kwargs) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher UnicodeEncodeError: 'ascii' codec can't encode characters in position 125-126: ordinal not in range(128) 2016-02-17 09:05:09.898 14856 TRACE oslo_messaging.rpc.dispatcher Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a volume with some extended unicode characters 2. Create a snapshot 3. Fails Actual results: Fails Expected results: Succeeds Additional info:
I yanked sosreport. Looks like osprofiler assumes that kwargs contain ascii characters only [1]. Please, disable osprofiler in /etc/cinder.conf. This is disabled by default so I assume you turned it on. [1] https://github.com/openstack/osprofiler/blob/master/osprofiler/profiler.py#L114
It seems that we have at least one place in the upstream Kilo (equivalent to the RHEL OSP 7.0 ) code that unconditionally turn on osprofiler [1], that's why it ignores a configuration parameter which is false by default. It's already fixed in master [2] so we can backport that patch as a workaround until osprofiler will fix an encoding problem. [1] https://github.com/openstack/cinder/blob/stable/kilo/cinder/service.py#L125 [2] https://github.com/openstack/cinder/blob/master/cinder/service.py#L134
This is the patch [1] that I mentioned in comment#3. [1] https://review.openstack.org/#/c/278595/
We removed the "osprofiler" configuration from the pipeline, restarted every services and retried ... same result, we're still getting the same error. Would it be possible to get a hotfix for this?
(In reply to David Hill from comment #5) > We removed the "osprofiler" configuration from the pipeline, restarted every > services and retried ... same result, we're still getting the same error. > Would it be possible to get a hotfix for this? We are working on that. Please, see comment#3 and comment#4.
I can confirm the patch is fixing my customer's issue . Thank you very much! Dave
Tested using: python-cinderclient-1.2.1-1.el7ost.noarch python-cinder-2015.1.3-5.el7ost.noarch openstack-cinder-2015.1.3-5.el7ost.noarch Verification flow: [stack@instack ~]$ cinder create 1 --display-name Adiós +---------------------+--------------------------------------+ | Property | Value | +---------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | created_at | 2016-04-13T07:16:42.156525 | | display_description | None | | display_name | Adiós | | encrypted | False | | id | 521ba707-c786-4614-80d7-801fef9d29c7 | | metadata | {} | | multiattach | false | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | volume_type | None | +---------------------+--------------------------------------+ [stack@instack ~]$ cinder list +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ | 521ba707-c786-4614-80d7-801fef9d29c7 | available | Adiós | 1 | - | false | | +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ [stack@instack ~]$ cinder snapshot-create 521ba707-c786-4614-80d7-801fef9d29c7 +---------------------+--------------------------------------+ | Property | Value | +---------------------+--------------------------------------+ | created_at | 2016-04-13T07:17:40.774504 | | display_description | None | | display_name | None | | id | b740bfc6-252f-4544-b306-a07c4784775e | | metadata | {} | | size | 1 | | status | creating | | volume_id | 521ba707-c786-4614-80d7-801fef9d29c7 | +---------------------+--------------------------------------+ [stack@instack ~]$ cinder snapshot-list +--------------------------------------+--------------------------------------+-----------+--------------+------+ | ID | Volume ID | Status | Display Name | Size | +--------------------------------------+--------------------------------------+-----------+--------------+------+ | b740bfc6-252f-4544-b306-a07c4784775e | 521ba707-c786-4614-80d7-801fef9d29c7 | available | - | 1 | +--------------------------------------+--------------------------------------+-----------+--------------+------+
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/RHBA-2016-0688.html