500 error if custom property key is greater than 255 characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Abhishek Kekane |
Bug Description
While creating the image if user passes property 'key' greater than 255 characters then it fails with 500 error. Ideally it should return 400 Bad Request to the user.
Steps to reproduce:
1. Create image
glance image-create --name mySignedImage --container-format bare --disk-format qcow2 --property "abcccccccccccc
Output:
500 Internal Server Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)
g-api logs:
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi [None req-61ff5b17-
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi Traceback (most recent call last):
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi request, **action_args)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return method(*args, **kwargs)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi image_repo.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self.base.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi super(ImageRepo
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self.base.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return super(ImageRepo
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self.base.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return super(ImageRepo
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self.base.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = super(ImageRepo
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self.base.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi new_values = self.db_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi image = _image_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return Retrying(*dargs, **dkw).call(f, *args, **kw)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return attempt.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi six.reraise(
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return f(*args, **kwargs)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi session)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return f(*args, **kwargs)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi image_property_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi prop = _image_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi prop_ref.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/opt/stack/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi super(GlanceBase, self).save(session or db_api.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi session.flush()
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi self._flush(
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi transaction.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi compat.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi flush_context.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi rec.execute(self)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi uow
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi mapper, table, insert)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi execute(statement, params)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return meth(self, multiparams, params)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi return connection.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi compiled_sql, distilled_params
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi context)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi util.raise_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi reraise(
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi context)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib64/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi cursor.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result = self._query(query)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi conn.query(q)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi self._affected_rows = self._read_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi result.read()
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi first_packet = self.connection
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi packet.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi err.raise_
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi File "/usr/lib/
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi raise errorclass(errno, errval)
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi DBDataError: (pymysql.
Dec 13 11:02:09 devstack <email address hidden>[20154]: ERROR glance.common.wsgi
Changed in glance: | |
assignee: | nobody → Abhishek Kekane (abhishek-kekane) |
Changed in glance: | |
status: | New → Confirmed |
Changed in glance: | |
importance: | Undecided → Medium |
milestone: | none → queens-3 |
Fix proposed to branch: master /review. openstack. org/530083
Review: https:/