Description of problem:
when installing trunk packstack with deloren repository the neutron QoS feature
is not working with an error
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters [req-2d0c502f-2f2f-4e21-86ec-85146762dfcb e964311dda704f1387458ed9244b428e df7749327f5c4deabbd9f8611a66b505 - - -] DBAPIError exception wra
pped from (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3") 'SELECT qos_polic
ies.tenant_id AS qos_policies_tenant_id, qos_policies.id AS qos_policies_id, qos_policies.name AS qos_policies_name, qos_policies.description AS qos_policies_description, qos_policies.shared AS qos_policies
_shared \nFROM qos_policies \nWHERE qos_policies.name = %s' ([u'test'],)
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters context)
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters self.errorhandler(self, exc, value)
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass, errorvalue
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the ri
ght syntax to use near ')' at line 3")
2015-09-20 21:53:50.848 89977 ERROR oslo_db.sqlalchemy.exc_filters
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource [req-2d0c502f-2f2f-4e21-86ec-85146762dfcb e964311dda704f1387458ed9244b428e df7749327f5c4deabbd9f8611a66b505 - - -] index failed
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource Traceback (most recent call last):
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 83, in resource
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource result = method(request=request, **args)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 340, in index
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return self._items(request, True, parent_id)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 267, in _items
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource obj_list = obj_getter(request.context, **kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_common.py", line 49, in inner_filter
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource result = f(*args, **kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_common.py", line 35, in inner
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource result = f(*args, **kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/services/qos/qos_plugin.py", line 84, in get_policies
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return policy_object.QosPolicy.get_objects(context, **filters)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/objects/qos/policy.py", line 108, in get_objects
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource **kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/objects/base.py", line 122, in get_objects
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource db_objs = db_api.get_objects(context, cls.db_model, **kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 91, in get_objects
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource .filter_by(**kwargs)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2320, in all
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return list(self)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2438, in __iter__
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return self._execute_and_instances(context)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2453, in _execute_and_instances
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource context)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 155, in _handle_dbapi_exception
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource e, statement, parameters, cursor, context)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1155, in _handle_dbapi_exception
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource context)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource self.errorhandler(self, exc, value)
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource raise errorclass, errorvalue
2015-09-20 21:53:50.853 89977 ERROR neutron.api.v2.resource DBError: (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3") 'SELECT qos_policies.tenant_id AS qos_policies_tenant_id, qos_policies.id AS qos_policies_id, qos_policies.name AS qos_policies_name, qos_policies.description AS qos_policies_description, qos_policies.shared AS qos_policies_shared \nFROM qos_policies \nWHERE qos_policies.name = %s' ([u'test'],)
after investigation with Ihar Hrachyshka <ihrachys> we found out the
openstack need MySQL-python-1.2.5 but EL7 comes with MySQL-python-1.2.3
According to Ihar this commit https://github.com/farcepest/MySQLdb1/commit/87d1145c0d6ee4f5a8ecf6d5c62d2479b9cf27ea in MySQL-python-1.2.5 solve the problem
Version-Release number of selected component (if applicable):
CentOS7.1 Openstack from rdo centos7 trunk http://trunk.rdoproject.org/centos7/current/
How reproducible:
1. install openstack with packstack on centos7
2. configure neutron QoS with openstack
3. neutron qos-policy-create test
4. neutron qos-policy-show test
Steps to Reproduce:
1.
2.
3.
Actual results:
Error in neutron server
manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 3") 'SELECT qos_policies.tenant_id AS qos_policies_tenant_id, qos_policies.id AS qos_policies_id, qos_policies.name AS qos_policies_name, qos_policies.description AS qos_policies_description, qos_policies.shared AS qos_policies_shared \nFROM qos_policies \nWHERE qos_policies.name = %s' ([u'test'],)
Expected results:
neutron qos-policy-show test show should show the qos policy information
Additional info:
for more info please contact
Ihar Hrachyshka <ihrachys>
(In reply to Moshe Levi from comment #0)
> How reproducible:
> 1. install openstack with packstack on centos7
> 2. configure neutron QoS with openstack
Can you provide a simpler reproducer, please? e.g. a piece of python script.
I'm assigning the bug to myself to look at why such code is generated
in the QoS path, so, we'd be safe to jump back into the .py driver or reduce
the friction for anyone who had it installed.
Removing RHEL73DevexpPrio tracker from this bug, because this one is not reported for DevExp component, however BZ#1266849 still is on DevExpPrio tracker.