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
Fix proposed to branch: master /review. openstack. org/381520
Review: https:/