Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton:Staging
openstack-neutron
0006-fix-list_availability_zones-for-postgresq....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-fix-list_availability_zones-for-postgresq.patch of Package openstack-neutron
From 5b9fe3494a80b3185b5d35dccbc71132211dd989 Mon Sep 17 00:00:00 2001 From: Ann Kamyshnikova <akamyshnikova@mirantis.com> Date: Tue, 4 Oct 2016 11:20:27 +0300 Subject: Fix _list_availability_zones for PostgreSQL For PostgreSQL _list_availability_zones crashes if you're using GROUP BY without object id. Use with_entities to use group_by correctly. Closes-bug: #1616793 Change-Id: Ibc09666bc5863a1980acd0a34d6545841a93a481 --- neutron/db/agents_db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neutron/db/agents_db.py b/neutron/db/agents_db.py index 4b97f53..f02b85d 100644 --- a/neutron/db/agents_db.py +++ b/neutron/db/agents_db.py @@ -128,9 +128,9 @@ class AgentAvailabilityZoneMixin(az_ext.AvailabilityZonePluginBase): def _list_availability_zones(self, context, filters=None): result = {} query = self._get_collection_query(context, Agent, filters=filters) - for agent in query.group_by(Agent.admin_state_up, - Agent.availability_zone, - Agent.agent_type): + columns = (Agent.admin_state_up, Agent.availability_zone, + Agent.agent_type) + for agent in query.with_entities(*columns).group_by(*columns): if not agent.availability_zone: continue if agent.agent_type == constants.AGENT_TYPE_DHCP:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor