Glance can`t create image with unicode name

Bug #1422750 reported by Kyrylo Romanenko
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
Medium
Darja Shakhray
7.0.x
Won't Fix
Medium
MOS Glance
8.0.x
Invalid
Medium
Darja Shakhray

Bug Description

Glance in MOS 6.1 failes to create image with Cyrillic name. Also it failed with Chinese and other non-English characters.
OpenStack is world-wide used, therefore unicode support is essential.
Other entities (volumes, users, projects, flavors) with Cyrillic names were created and modified successfully.

Steps to reproduce (Horizon):

1) Login as admin
2) Navigate to Project -> Compute -> Images
3) Create Image:
- Fill Cyrillic image name
- Select image by file or by URL.
- Select format ISO.
4) Click Create Image button.

Expected: to have new image with Cyrillic name.
Actual result: rep popup message "Danger: There was an error submitting the form. Please try again."

Browser console:
Remote Address:172.16.0.2:80
Request URL:http://172.16.0.2/dashboard/project/images/create/
Request Method:POST
Status Code:500 INTERNAL SERVER ERROR
Part of Response:
    <h2>Something went wrong!</h2>
        <p>An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.</p>

Steps to reproduce (CLI):

1) Login over SSH to Controller node.
2) Download ISO image and upload by SCP to Controller node.
3) Actual execution and result:

[root@node-1 ~]# glance image-create --name ОБРАЗ --file ./dsl-4.11.rc2.iso --disk-format iso --container-format bare

'ascii' codec can't decode byte 0xd0 in position 19: ordinal not in range(128)

Expected behavior with English imagename:
[root@node-1 ~]# glance image-create --name IMAGE --file ./dsl-4.11.rc2.iso --disk-format iso --container-format bare
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 4b61c7892eefc23b71d4931bdcc3f1f1 |
| container_format | bare |
| created_at | 2015-02-17T14:12:15 |
| deleted | False |
| deleted_at | None |
| disk_format | iso |
| id | aa8ffb34-678f-4e94-a3ed-ea55c437b01b |
... etc...

Environment:
{"build_id": "2015-02-15_22-54-44", "ostf_sha": "f9c37d0876141e1550eb4e703a8e500cd463282f", "build_number": "126", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-02-15_22-54-44", "ostf_sha": "f9c37d0876141e1550eb4e703a8e500cd463282f", "build_number": "126", "api": "1.0", "nailgun_sha": "1e3a40dd8a17abe1d38f42da1e0dc1a6d4572666", "production": "docker", "python-fuelclient_sha": "61431ed16fc00039a269424bdbaa410277eff609", "astute_sha": "1f87a9b9a47de7498b4061d15a8c7fb9435709d5", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "2054229e275d08898b5d079a6625ffcc79ae23b8", "fuellib_sha": "7f8d4382abfcd4338964182ebfea1d539f963e66"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "1e3a40dd8a17abe1d38f42da1e0dc1a6d4572666", "production": "docker", "python-fuelclient_sha": "61431ed16fc00039a269424bdbaa410277eff609", "astute_sha": "1f87a9b9a47de7498b4061d15a8c7fb9435709d5", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "2054229e275d08898b5d079a6625ffcc79ae23b8", "fuellib_sha": "7f8d4382abfcd4338964182ebfea1d539f963e66"}

Glance version: 0.14.1

Devstack:
It works on devstack.
glance image-create --name ОБРАЗ --file ~/Downloads/dsl-4.11.rc2.iso --disk-format iso --container-format bare
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 4b61c7892eefc23b71d4931bdcc3f1f1 |
| container_format | bare |
| created_at | 2015-02-17T14:25:41 |
| deleted | False |
| deleted_at | None |
| disk_format | iso |
| id | 00ebde52-e365-4ab1-bc78-7c2255b461d4 |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | ОБРАЗ |
| owner | 1e2690c5867f4c2ba648996f3d5f12ae |
| protected | False |
| size | 52824064 |
| status | active |
| updated_at | 2015-02-17T14:25:41 |
| virtual_size | None |
+------------------+--------------------------------------+
And via Horizon on Devstack it also works.

Devstack Info:
os|distro=trusty
os|vendor=Ubuntu
os|release=14.04
git|cinder|master[2079b0f]
git|glance|master[8d21220]
git|heat|master[6d6e417]
git|heat-cfntools|master[a7ffb71]
git|heat-templates|master[35e6837]
git|horizon|master[680488d]
git|keystone|master[e54c323]

Glance version: 0.15.0
Seems that Glance 0.15 can handle unicode

Tags: glance
Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :
description: updated
summary: - Can not create image with unicode name
+ Glance can`t create image with unicode name
ruhe (ruhe)
Changed in mos:
assignee: nobody → MOS Glance (mos-glance)
Changed in mos:
milestone: none → 6.1
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

The bug does not look that severe as there is a workaround - create image with latin name. Not pretty, but works well, hence lowering to medium.

Changed in mos:
importance: High → Medium
ruhe (ruhe)
Changed in mos:
milestone: 6.1 → 7.0
Revision history for this message
Mike Fedosin (mfedosin) wrote :

Works fine on stable/kilo http://paste.openstack.org/show/384349/

Changed in mos:
status: Confirmed → Invalid
Revision history for this message
Alexey Galkin (agalkin) wrote :

Tested on MOS 7.0 iso #301 (RC4). Issue is reproduced again.
Backport this fix please : https://review.openstack.org/#/c/206037/

Changed in mos:
status: Invalid → Confirmed
milestone: 7.0 → 7.0-updates
Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Nominated for 8.0 and Won't Fix for 7.0-updates because of Medium importance

Revision history for this message
ruhe (ruhe) wrote :

Alexey, please verify that this issue is no longer reproducible in 8.0

Revision history for this message
Alexey Galkin (agalkin) wrote :

Reproduced on:

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "264"
  build_id: "264"
  fuel-nailgun_sha: "0e09dce510927f2cc490b898e5fe3f813bd791be"
  python-fuelclient_sha: "f033192b84263f0e699458a4274289a5198ae7e4"
  fuel-agent_sha: "660c6514caa8f5fcd482f1cc4008a6028243e009"
  fuel-nailgun-agent_sha: "a33a58d378c117c0f509b0e7badc6f0910364154"
  astute_sha: "48fd58676debcc85951db68df6d77c22daa55e52"
  fuel-library_sha: "ab7e51f345ffb7c256e0f61addcf86553d7c3867"
  fuel-ostf_sha: "23b7ae2a1a57de5a3e1861ffb7805394ca339cc2"
  fuel-mirror_sha: "6534117233a5bdc51d7d47361bc7d511e4b11e6f"
  fuelmenu_sha: "fcb15df4fd1a790b17dd78cf675c11c279040941"
  shotgun_sha: "a0bd06508067935f2ae9be2523ed0d1717b995ce"
  network-checker_sha: "a3534f8885246afb15609c54f91d3b23d599a5b1"
  fuel-upgrade_sha: "1e894e26d4e1423a9b0d66abd6a79505f4175ff6"
  fuelmain_sha: "26adf12c320936a97a9b0a84169a6e58c530e848"

Revision history for this message
Darja Shakhray (dshakhray) wrote :

The error is that the image is created, but not displayed:
HTTP/1.1 201 Created
content-length: 552
connection: close
location: http://192.168.0.2:9292/v2/images/5358b62c-f987-4705-bdc4-ccad1f0e533c
date: Mon, 14 Dec 2015 17:19:22 GMT
content-type: application/json; charset=UTF-8
x-openstack-request-id: req-b99d1e90-25e4-41c7-a507-113365a7afe8

{"status": "queued", "name": "ЮНИКОД", "tags": [], "container_format": null, "created_at": "2015-12-14T17:19:22Z", "size": null, "disk_format": null, "updated_at": "2015-12-14T17:19:22Z", "visibility": "private", "self": "/v2/images/5358b62c-f987-4705-bdc4-ccad1f0e533c", "min_disk": 0, "protected": false, "id": "5358b62c-f987-4705-bdc4-ccad1f0e533c", "file": "/v2/images/5358b62c-f987-4705-bdc4-ccad1f0e533c/file", "checksum": null, "owner": "92f1bb66082248968fb5e82818ed5676", "virtual_size": null, "min_ram": 0, "schema": "/v2/schemas/image"}

Full stacktrace: http://paste.openstack.org/show/481836/

Reported bug "Images are not displayed with non-ascii name": https://bugs.launchpad.net/mos/+bug/1525998

Revision history for this message
Alexey Galkin (agalkin) wrote :

This problem related with unset (wrong) locale in bash. For resolve this problem you need set a utf8 locale in bash, type into console:

export LC_ALL=en_US.UTF-8

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.