yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #55535
[Bug 1616793] [NEW] neutron availability-zone-list got a db error using postgresql
Public bug reported:
when use cli command "neutron availability-zone-list" with postgresql db
backend,I got a server error,like below:
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 84, in resource
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 148, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource self.force_reraise()
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 341, in index
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._items(request, True, parent_id)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 267, in _items
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource obj_list = obj_getter(request.context, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 155, in get_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context, filters))]
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 132, in _list_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Agent.agent_type):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._execute_and_instances(context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource DBError: (psycopg2.ProgrammingError) column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
** Affects: neutron
Importance: Undecided
Assignee: brenda (tian-mingming)
Status: New
** Changed in: neutron
Assignee: (unassigned) => brenda (tian-mingming)
** Description changed:
when use cli command "neutron availability-zone-list" with postgresql db
backend,I got a server error,like below:
- 1f2ce05c6ff342eca06920525ab11923 - - -] DBAPIError exception wrapped from (psycopg2.ProgrammingError) column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
- LINE 1: SELECT agents.id AS agents_id, agents.agent_type AS agents_a...
- ^
- [SQL: 'SELECT agents.id AS agents_id, agents.agent_type AS agents_agent_type, agents."binary" AS agents_binary, agents.topic AS agents_topic, agents.host AS agents_host, agents.availability_zone AS agents_availability_zone, agents.admin_state_up AS agents_admin_state_up, agents.created_at AS agents_created_at, agents.started_at AS agents_started_at, agents.heartbeat_timestamp AS agents_heartbeat_timestamp, agents.description AS agents_description, agents.configurations AS agents_configurations, agents.resource_versions AS agents_resource_versions, agents.load AS agents_load \nFROM agents GROUP BY agents.admin_state_up, agents.availability_zone, agents.agent_type']
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters context)
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters ProgrammingError: column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters LINE 1: SELECT agents.id AS agents_id, agents.agent_type AS agents_a...
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters ^
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters
- 2016-08-25 13:41:17.785 29748 ERROR oslo_db.sqlalchemy.exc_filters
- 2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource [req-8506cf81-aa42-4cc0-9f7c-9a6f1743c46c d97366d8aeb449edb9a91949a9d213e3 1f2ce05c6ff342eca06920525ab11923 - - -] index failed
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 84, in resource
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 148, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource self.force_reraise()
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 341, in index
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._items(request, True, parent_id)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 267, in _items
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource obj_list = obj_getter(request.context, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 155, in get_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context, filters))]
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 132, in _list_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Agent.agent_type):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._execute_and_instances(context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource DBError: (psycopg2.ProgrammingError) column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
- 2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource LINE 1: SELECT agents.id AS agents_id, agents.agent_type AS agents_a...
- 2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource ^
- 2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource [SQL: 'SELECT agents.id AS agents_id, agents.agent_type AS agents_agent_type, agents."binary" AS agents_binary, agents.topic AS agents_topic, agents.host AS agents_host, agents.availability_zone AS agents_availability_zone, agents.admin_state_up AS agents_admin_state_up, agents.created_at AS agents_created_at, agents.started_at AS agents_started_at, agents.heartbeat_timestamp AS agents_heartbeat_timestamp, agents.description AS agents_description, agents.configurations AS agents_configurations, agents.resource_versions AS agents_resource_versions, agents.load AS agents_load \nFROM agents GROUP BY agents.admin_state_up, agents.availability_zone, agents.agent_type']
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1616793
Title:
neutron availability-zone-list got a db error using postgresql
Status in neutron:
New
Bug description:
when use cli command "neutron availability-zone-list" with postgresql
db backend,I got a server error,like below:
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Traceback (most recent call last):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 84, in resource
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = method(request=request, **args)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 148, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource self.force_reraise()
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 138, in wrapper
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 341, in index
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._items(request, True, parent_id)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 267, in _items
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource obj_list = obj_getter(request.context, **kwargs)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 155, in get_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context, filters))]
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/agents_db.py", line 132, in _list_availability_zones
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource Agent.agent_type):
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return self._execute_and_instances(context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource context)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2016-08-25 13:41:17.808 29748 ERROR neutron.api.v2.resource DBError: (psycopg2.ProgrammingError) column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1616793/+subscriptions
Follow ups