Bug 888952

Summary: non-ASCII volume display name breaks 'cinder show'
Product: Red Hat OpenStack Reporter: Russell Bryant <rbryant>
Component: python-cinderclientAssignee: Flavio Percoco <fpercoco>
Status: CLOSED ERRATA QA Contact: Giulio Fidente <gfidente>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: ajeain, fpercoco, gfidente, jhenner, jruzicka
Target Milestone: asyncKeywords: i18n, Triaged
Target Release: 2.1Flags: fpercoco: internal-review+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-cinderclient-1.0.1-4.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-09 13:53:09 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 Russell Bryant 2012-12-19 21:26:47 UTC
Description of problem:

After creating a volume with a display name that includes non-ASCII characters, you can not get the details of the volume by name using 'cinder show'


Version-Release number of selected component (if applicable):

openstack-cinder-2012.2.1-1.el6ost.noarch
python-cinderclient-0.2.26-1.el6.noarch
python-cinder-2012.2.1-1.el6ost.noarch


Steps to Reproduce:

[root@rhel ~(keystone_username)]# cinder list
cind+--------------------------------------+-----------+--------------+------+-------------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| 339f591a-ebc7-4f8c-aa51-eb6d99409739 | available | test volume  |  1   |     None    |             |
| d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a | available |   El Niño    |  1   |     None    |             |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
e[root@rhel ~(keystone_username)]# cinder show "test volume"
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|      created_at     |      2012-12-18T17:39:15.000000      |
| display_description |                 None                 |
|     display_name    |             test volume              |
|          id         | 339f591a-ebc7-4f8c-aa51-eb6d99409739 |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|        status       |              available               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+
[root@rhel ~(keystone_username)]# cinder show "El Niño"
/usr/lib/python2.6/site-packages/cinderclient/base.py:200: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  for (attr, value) in searches):
ERROR: No volume with a name or ID of 'El Niño' exists.

Comment 1 Russell Bryant 2012-12-19 21:31:52 UTC
Same bug for cinder snapshot-show ...

[root@rhel ~(keystone_username)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| 339f591a-ebc7-4f8c-aa51-eb6d99409739 | available | test volume  |  1   |     None    |             |
| d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a | available |   El Niño    |  1   |     None    |             |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
[root@rhel ~(keystone_username)]# cinder snapshot-create --display_name "La Niña" --display-description "La Niña" d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|      created_at     |      2012-12-19T21:27:08.492379      |
| display_description |               La Niña                |
|     display_name    |               La Niña                |
|          id         | 15a6d373-a272-491e-a35f-3a8af54384c6 |
|         size        |                  1                   |
|        status       |               creating               |
|      volume_id      | d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a |
+---------------------+--------------------------------------+
[root@rhel ~(keystone_username)]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+
|                  ID                  |              Volume ID               |   Status  | Display Name | Size |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| 15a6d373-a272-491e-a35f-3a8af54384c6 | d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a | available |   La Niña    |  1   |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
[root@rhel ~(keystone_username)]# cinder snapshot-show 15a6d373-a272-491e-a35f-3a8af54384c6
+--------------------------------------------+--------------------------------------+
|                  Property                  |                Value                 |
+--------------------------------------------+--------------------------------------+
|                 created_at                 |      2012-12-19T21:27:08.000000      |
|            display_description             |               La Niña                |
|                display_name                |               La Niña                |
|                     id                     | 15a6d373-a272-491e-a35f-3a8af54384c6 |
|  os-extended-snapshot-attributes:progress  |                 100%                 |
| os-extended-snapshot-attributes:project_id |   34e9ef477d70492db00e28d130d5584c   |
|                    size                    |                  1                   |
|                   status                   |              available               |
|                 volume_id                  | d89b6e6c-d7ec-48aa-966a-c24b2ba0c60a |
+--------------------------------------------+--------------------------------------+
[root@rhel ~(keystone_username)]# cinder snapshot-show "La Niña"
/usr/lib/python2.6/site-packages/cinderclient/base.py:200: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  for (attr, value) in searches):
ERROR: No snapshot with a name or ID of 'La Niña' exists.

Comment 3 Alan Pevec 2012-12-21 17:38:36 UTC
Looks like there's upstream work required to cleanup i18n issues across all openstack clients (see also novaclient bug 888483)

Comment 4 Jakub Ruzicka 2013-04-02 15:26:29 UTC
Fixed by Flavio's backport.

Comment 6 Giulio Fidente 2013-04-26 12:40:14 UTC
works for me using python-cinderclient-1.0.1-4.el6ost.noarch

Comment 8 errata-xmlrpc 2013-05-09 13:53:09 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.

http://rhn.redhat.com/errata/RHBA-2013-0802.html