yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #58899
[Bug 1610103] Re: Creating qos with name that has more than 255 characters returns 500 error.
Reviewed: https://review.openstack.org/352200
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=01c4bda9516a0370d7ffc2975a48a1d4d4ed5c2e
Submitter: Jenkins
Branch: master
commit 01c4bda9516a0370d7ffc2975a48a1d4d4ed5c2e
Author: Nam Nguyen Hoai <namnh@xxxxxxxxxxxxxx>
Date: Tue Aug 9 09:20:33 2016 +0700
Disallow specifying too long name and description for qos
Change-Id: I5c3ed086a7b6ac98186a136a2e449d31e8a93aec
Closes-Bug: #1610103
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1610103
Title:
Creating qos with name that has more than 255 characters returns 500
error.
Status in neutron:
Fix Released
Bug description:
Neutron tries to store description that has more than 255 characters.
Length of description should be validated.
=== Request command ===
$ neutron qos-policy-create nam-
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
=== Here is result ===
stack@hoainam:~/devstack$ neutron qos-policy-create nam-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-8fd52988-8e3e-449a-85d9-a13bee8d91b6']
=== Here is LoG ===
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 392, in commit
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource self._prepare_impl()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 372, in _prepare_impl
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource self.session.flush()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2019, in flush
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource self._flush(objects)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2137, in _flush
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource transaction.rollback(_capture_exception=True)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource compat.reraise(exc_type, exc_value, exc_tb)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2101, in _flush
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource flush_context.execute()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource rec.execute(self)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource uow
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 174, in save_obj
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource mapper, table, insert)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 767, in _emit_insert_statements
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource execute(statement, multiparams)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource return meth(self, multiparams, params)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource compiled_sql, distilled_params
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource context)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb, cause=cause)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource context)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource cursor.execute(statement, parameters)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 167, in execute
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource result = self._query(query)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 323, in _query
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource conn.query(q)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 836, in query
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1020, in _read_query_result
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource result.read()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1303, in read
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource first_packet = self.connection._read_packet()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 982, in _read_packet
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource packet.check_error()
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in check_error
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource err.raise_mysql_exception(self._data)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 120, in raise_mysql_exception
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource _check_mysql_exception(errinfo)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource raise errorclass(errno, errorvalue)
2016-08-06 14:24:12.625 TRACE neutron.api.v2.resource DBError: (pymysql.err.DataError) (1406, u"Data too long for column 'name' at row 1") [SQL: u'INSERT INTO qos_policies (project_id, id, name, description) VALUES (%(project_id)s, %(id)s, %(name)s, %(description)s)'] [parameters: {'description': u'', 'project_id': u'9918748356394e288bc079759efd0ee1', 'id': 'bbba5ba1-8446-48f4-b8c1-33318ec668c2', 'name': u'nam-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'}]
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1610103/+subscriptions
References