From 85c76a7f0827ff8f278d071a0b3f721847079711 Mon Sep 17 00:00:00 2001 From: smccully Date: Sun, 5 Feb 2017 21:43:31 +0000 Subject: [PATCH] allocations.consumer_id is not used in query. PostGreSQL required consumer_id in group by clause, but consumer_id is not being used in the query and is superfluous. Change-Id: I47b758b949b7fbed70906e9a95cbe7bb99da13c2 Closes-Bug: 1662012 --- nova/objects/resource_provider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nova/objects/resource_provider.py b/nova/objects/resource_provider.py index 4b8bad219ce9..79c9af7131f2 100644 --- a/nova/objects/resource_provider.py +++ b/nova/objects/resource_provider.py @@ -975,7 +975,6 @@ def _check_capacity_exceeded(conn, allocs): provider_uuids = set([a.resource_provider.uuid for a in allocs]) usage = sa.select([_ALLOC_TBL.c.resource_provider_id, - _ALLOC_TBL.c.consumer_id, _ALLOC_TBL.c.resource_class_id, sql.func.sum(_ALLOC_TBL.c.used).label('used')]) usage = usage.where(_ALLOC_TBL.c.resource_class_id.in_(rc_ids))