Images: 256 character limit isn't accurate (bytes limit?)

Bug #1412882 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Triaged
Low
Unassigned

Bug Description

The 256 characters limit for Images doesn't seem quite accurate. If you try to set up a long name with special characters (less than 256 characters, but more than 256 bytes?) it fails.

A user reported:

1. Create a vm
2. Create a snapshot from the vm and the name of the snapshot should be more than 256 bytes. For example: を引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様はを引き続きご使用になるお客様は
3. Horizon fails with a generic error.

But actually it is the same with e.g. just creating a new image (The error returned is the generic: "Unable to create new image. ")

We see this in the logs:

[Tue Jan 20 16:40:45.594430 2015] [:error] [pid 17230] Recoverable error: <html>
[Tue Jan 20 16:40:45.594454 2015] [:error] [pid 17230] <head>
[Tue Jan 20 16:40:45.594458 2015] [:error] [pid 17230] <title>400 Bad Request</title>
[Tue Jan 20 16:40:45.594460 2015] [:error] [pid 17230] </head>
[Tue Jan 20 16:40:45.594462 2015] [:error] [pid 17230] <body>
[Tue Jan 20 16:40:45.594465 2015] [:error] [pid 17230] <h1>400 Bad Request</h1>
[Tue Jan 20 16:40:45.594467 2015] [:error] [pid 17230] Image name too long: 405<br /><br />
[Tue Jan 20 16:40:45.594469 2015] [:error] [pid 17230]
[Tue Jan 20 16:40:45.594472 2015] [:error] [pid 17230] </body>
[Tue Jan 20 16:40:45.594474 2015] [:error] [pid 17230] </html> (HTTP 400)

So Glance does return a more meaningful error, that we should try to present to the user.

Tags: image
Julie Pichon (jpichon)
summary: - Images: 256 character limits isn't accurate (bytes limit?)
+ Images: 256 character limit isn't accurate (bytes limit?)
Changed in horizon:
assignee: nobody → Nikunj Aggarwal (nikunj2512)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Nikunj Aggarwal (nikunj2512) → nobody
Revision history for this message
Matt Borland (palecrow) wrote :

This is similar to other errors where there is a 400 (bad request) and then a string that may not be localized to the user, or consistent. As a result, this makes it hard to reliably report the error in a user-localized way. It seems we may need a more comprehensive solution to this problem...more than just passing on the error string.

Changed in horizon:
status: In Progress → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/152909
Reason: Abandoning for now, hasn't been updated in 3 months. Feel free to restore and update if you get time to work on the patch. Thanks!

anusha (anusha)
Changed in horizon:
assignee: nobody → anusha (anusha)
anusha (anusha)
Changed in horizon:
assignee: anusha (anusha) → nobody
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.