Returning unprecise error message when you create image with long name

Bug #1359017 reported by Jin Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

Image creation fails when the image name is > 255 chars, but the error message does not indicate that name length is the issue. Note that double byte names work if they do not exceed the Glance length limit.

Upon clicking on Import button from GUI, console displayed below 500 internal error message:
==================================
Error
An error occurred while creating image Test to see if text counter can handle double byte.Test to see if text counter can handle double byte..

Explanation: The server encountered an unexpected error: 500 (Internal Server Error).

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

1. Please upload necessary log of glance-api/reg, it's useful to help you resolve this issue.
2. Which api version you used?

Revision history for this message
Jin Liu (liujinbj) wrote :

I tried this case in the latest Juno master, I find it's ok now

linux:˜/source> glance image-create --name="cirros-0.3.2-x86_64-11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" --disk-format=qcow2 \
> --container-format=bare --is-public=true --min-disk=133766616\
> --copy-from http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
Request returned failure status 400.
<html>
<head>
  <title>400 Bad Request</title>
</head>
<body>
  <h1>400 Bad Request</h1>
  Image name too long: 820<br /><br />

</body>
</html> (HTTP 400)

Changed in glance:
status: New → Invalid
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.