Proper error message to user in case 4 byte unicode characters are used for entity names.

Bug #1545729 reported by Sheel Rana
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Low
Stephen Finucane

Bug Description

mysql database does not support 4 byte unicode due to its utf8 character set.

If any operation is executed with 4byte unicode name, it reports 500 error without any proper error message to user.
This will be confusing for user as no information is present about why this issue occurred.

Please refer below for details:

nova secgroup-create sheel πŸŒ‹
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'oslo_db.exception.DBError'> (HTTP 500) (Request-ID: req-a4eef1d6-11fa-4188-b116-ffdf728e04f4)

Bug can be reproduced by simply using 4byte unicode characters in name of security group.

This is 100% reproducible.

Tags: api db
Changed in nova:
assignee: nobody → Sheel Rana (ranasheel2000)
description: updated
Revision history for this message
Augustina Ragwitz (auggy) wrote : Re: Use 4 byte unicode for entity names in mysql

This is a feature request. If you'd like to move forward with using 4-byte unicode characters on the backend, please submit a spec for doing so. If the issue is that the returned error is confusing and you'd like that improved, that is a valid bug and this issue can be reopened with that as the bug description.

tags: added: compute
summary: - 4 byte unicode handling for entity names
+ Nova should use 4 byte unicode for entity names
summary: - Nova should use 4 byte unicode for entity names
+ Use 4 byte unicode for entity names in mysql
Changed in nova:
status: New → Invalid
Revision history for this message
Augustina Ragwitz (auggy) wrote :
Revision history for this message
Sheel Rana (ranasheel2000) wrote :

Actually I have already created BP for same.
Please refer below link:

https://blueprints.launchpad.net/nova/+spec/handling-4-byte-unicode-nova

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

BP implementation will require much time because of migration related changes.
Spec for same is already in discussion.
Please refer below:

https://review.openstack.org/#/c/280371/

So, I created this bug for better message to user in case 4 byte unicode is used in entity names as short term fix.

I will update the issue details and reopen it for short time fix.

Thanks!!

Changed in nova:
status: Invalid → In Progress
summary: - Use 4 byte unicode for entity names in mysql
+ Proper error message to user in case 4 byte unicode characters are used
+ for entity names.
Sean Dague (sdague)
tags: added: api
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/282862

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

Here is the sample output after fix:

root@sheel-VirtualBox:/opt/stack/nova/nova/db/sqlalchemy# nova secgroup-create sheel4 πŸŒ‹
ERROR (BadRequest): Invalid parameters- 4 byte unicode characters used in Name=sheel4 or Description=πŸŒ‹. (HTTP 400) (Request-ID: req-503aaf79-b5bc-4984-97ea-9b77ae243c2e)

Matt Riedemann (mriedem)
tags: added: db
removed: compute
Revision history for this message
Sheel Rana (ranasheel2000) wrote :

As discussed with nova cores, I will check with schema validation for security groups to fix this issue...
working on same..

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/282862

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@Sheel: Are you still working on that?

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

Dear Markus,

I am bit busy these days. So currently I am not looking into it.
In case anyone interested, please pick it. Else I will do it in next month or so.

Changed in nova:
assignee: Sheel Rana (ranasheel2000) → Hussain Chachuliya (hussainchachuliya)
Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Invalid
assignee: Hussain Chachuliya (hussainchachuliya) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Found open reviews for this bug in gerrit, setting to In Progress.

review: https://review.openstack.org/407514 in branch: master

Changed in nova:
status: Invalid → In Progress
assignee: nobody → Hussain Chachuliya (hussainchachuliya)
Changed in nova:
assignee: Hussain Chachuliya (hussainchachuliya) → Takashi NATSUME (natsume-takashi)
Changed in nova:
assignee: Takashi NATSUME (natsume-takashi) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Stephen Finucane (stephenfinucane)
status: Confirmed → In Progress
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.