Listing resource providers in placement with a postgresql backend gets a group by error
Bug #1765204 reported by
Chris Dent
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Chris Dent |
Bug Description
When listing resource providers in placement with a postgresql database, this error recently started showing up:
column "root_rp.uuid" must appear in the GROUP BY clause or be used in an aggregate function
And then once you fix that it says the same for parent_rp.uuid.
It's not clear when this problem came on the scene, since we don't test regularly with postgresql, but I do use it in my experiments with placement in a container [1] and it wasn't there as of April 6th, and probably a bit later.
Work is in progress to fix this as well as turn on an experimental job for checking with postgres every now and again.
Changed in nova: | |
assignee: | nobody → Chris Dent (cdent) |
status: | Triaged → In Progress |
tags: | added: postgresql |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/562379 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=979b066be4d f4e92b44efe35e0 b39f43e2079be6
Committed: https:/
Submitter: Zuul
Branch: master
commit 979b066be4df4e9 2b44efe35e0b39f 43e2079be6
Author: Chris Dent <email address hidden>
Date: Wed Apr 18 21:25:56 2018 +0100
Add root and parent provider uuid to group by clause
Without the group by, postgres complains with:
column "root_rp.uuid" must appear in the GROUP BY clause or be
used in an aggregate function
which is a common complaint between mysql and postgresql. After
that is fixed, it complains about parent_rp.uuid.
This problem was discovered using my placedock container[1] with
a postgres database. The change that causes this to be necessary
must be relatively recent as this wasn't happening last week.
The problem can show up when the outer join to the root_rp and
parent_rp copies of the resource_providers table can only produce
a single row. The joins to those aliased tables are what is
upsetting postgresql.
[1] https:/ /hub.docker. com/r/cdent/ placedock/
Closes-Bug: 1765204 ff8836d01f60bb0 35fb1c59758
Change-Id: I9fb3db0d7e025f