Bug 1310831

Summary: If a snapshot is created from volume with names containing some unicode letters (spanish, french, german), a TRACE is generated and snapshot fails
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: dhill, eharney, sgotliv, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-2015.1.3-3.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-26 15:30:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hill 2016-02-22 17:55:34 UTC
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:

Comment 2 Sergey Gotliv 2016-02-23 11:45:34 UTC
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

Comment 3 Sergey Gotliv 2016-02-24 11:07:30 UTC
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

Comment 4 Sergey Gotliv 2016-02-24 11:12:47 UTC
This is the patch [1] that I mentioned in comment#3.

[1] https://review.openstack.org/#/c/278595/

Comment 5 David Hill 2016-02-24 19:34:37 UTC
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?

Comment 6 Sergey Gotliv 2016-02-25 07:02:51 UTC
(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.

Comment 7 David Hill 2016-03-07 19:06:16 UTC
I can confirm the patch is fixing my customer's issue .  Thank you very much!

Dave

Comment 9 lkuchlan 2016-04-13 07:23:31 UTC
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   |
+--------------------------------------+--------------------------------------+-----------+--------------+------+

Comment 11 errata-xmlrpc 2016-04-26 15:30:31 UTC
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