Listing resource providers in placement with a postgresql backend gets a group by error

Bug #1765204 reported by Chris Dent
6
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.

[1] https://hub.docker.com/r/cdent/placedock/

Changed in nova:
assignee: nobody → Chris Dent (cdent)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/562379
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=979b066be4df4e92b44efe35e0b39f43e2079be6
Submitter: Zuul
Branch: master

commit 979b066be4df4e92b44efe35e0b39f43e2079be6
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
    Change-Id: I9fb3db0d7e025fff8836d01f60bb035fb1c59758

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
tags: added: postgresql
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b2

This issue was fixed in the openstack/nova 18.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.