Bug 888952 - non-ASCII volume display name breaks 'cinder show'
non-ASCII volume display name breaks 'cinder show'
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-cinderclient (Show other bugs)
2.1
Unspecified Unspecified
medium Severity medium
: async
: 2.1
Assigned To: Flavio Percoco
Giulio Fidente
: i18n, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-19 16:26 EST by Russell Bryant
Modified: 2016-04-26 23:09 EDT (History)
5 users (show)

See Also:
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 09:53:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
fpercoco: internal‑review+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1130572 None None None Never
OpenStack gerrit 23089 None None None Never

  None (edit)
Description Russell Bryant 2012-12-19 16:26:47 EST
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 16:31:52 EST
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 12:38:36 EST
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 11:26:29 EDT
Fixed by Flavio's backport.
Comment 6 Giulio Fidente 2013-04-26 08:40:14 EDT
works for me using python-cinderclient-1.0.1-4.el6ost.noarch
Comment 8 errata-xmlrpc 2013-05-09 09:53:09 EDT
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

Note You need to log in before you can comment on or make changes to this bug.