psycopg2 postgresql and placment DBAPI Error

asked 2020-02-12 22:26:52 -0500

jmora gravatar image

Openstack Train - EL7 - python3 - postgresql - psycopg2 - built from source

I just finished configuring the placement-api, all seems fine through the db sync, but seem to have issues when communicating with placement-api. Below is the error i get when running 'placement-status upgrade check'

I did not have this issue when running with mariadb, seems to be with postgresql.

Any suggestions would be great.

root@dc1-ctl-001 wcadmin]# placement-status upgrade check DBAPIError exception wrapped. Traceback (most recent call last): File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context cursor, statement, parameters, context File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute cursor.execute(statement, parameters) psycopg2.errors.GroupingError: column "allocations.created_at" must appear in the GROUP BY clause or be used in an aggregate function LINE 2: FROM (SELECT allocations.created_at AS allocations_created_a... ^

Error: Traceback (most recent call last): File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context cursor, statement, parameters, context File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute cursor.execute(statement, parameters) psycopg2.errors.GroupingError: column "allocations.created_at" must appear in the GROUP BY clause or be used in an aggregate function LINE 2: FROM (SELECT allocations.created_at AS allocations_created_a... ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/oslo_upgradecheck/upgradecheck.py", line 192, in run return conf.command.action_fn() File "/usr/local/lib/python3.6/site-packages/oslo_upgradecheck/upgradecheck.py", line 102, in check result = func(self) File "/usr/local/lib/python3.6/site-packages/placement/cmd/status.py", line 85, in _check_incomplete_consumers missing_consumer_count = self._count_missing_consumers(self.ctxt) File "/usr/local/lib/python3.6/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1015, in wrapper return fn(args, *kwargs) File "/usr/local/lib/python3.6/site-packages/placement/cmd/status.py", line 64, in _count_missing_consumers models.Allocation.consumer_id).count() File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3653, in count return self.from_self(col).scalar() File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3377, in scalar ret = self.one() File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3347, in one ret = self.one_or_none() File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3316, in one_or_none ret = list(self) File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3389, in __iter__ return self._execute_and_instances(context) File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3414, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 982, in execute return meth(self, multiparams, params) File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement distilled_params, File "/usr/local/lib64/python3 ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-02-13 06:33:11 -0500

cdent gravatar image

This is a bug in in placement, probably because postgresql is not tested enough. If you can please open a bug on storyboard: https://storyboard.openstack.org/#!/p... Include your tracebacks.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-02-12 22:26:52 -0500

Seen: 100 times

Last updated: Feb 13