← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2086787] Re: neutron fails with postgres on agents

 

Patch merged in  stable/2024.2. Backports proposed up to 2023.2.

Closing this bug now.

** Changed in: neutron
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2086787

Title:
  neutron fails with postgres on agents

Status in neutron:
  Fix Released

Bug description:
  I am using PostgreSQL as a database for OpenStack after upgrade from 2023.2 to 2024.1
  When I want to create a new network with OVN backend I have the following error in neutron-server:

  POST failed.: oslo_db.exception.DBError: (psycopg2.errors.GroupingError) column "agents.id" must appear in the GROUP BY clause or be used in an aggregate function
  LINE 1: SELECT agents.id AS agents_id, agents.agent_type AS agents_a...
                 ^
  [SQL: SELECT agents.id AS agents_id, agents.agent_type AS agents_agent_type, agents."binary" AS agents_binary, agents.topic AS agents_topic, agents.host AS agents_host, agents.availability_zone AS agents_availability_zone, agents.admin_state_up AS agents_admin_state_up, agents.created_at AS agents_created_at, agents.started_at AS agents_started_at, agents.heartbeat_timestamp AS agents_heartbeat_timestamp, agents.description AS agents_description, agents.configurations AS agents_configurations, agents.resource_versions AS agents_resource_versions, agents.load AS agents_load, agents.resources_synced AS agents_resources_synced 
  FROM agents 
  WHERE agents.agent_type = %(agent_type_1)s AND agents.availability_zone IN (%(availability_zone_1_1)s) GROUP BY agents.availability_zone]
  [parameters: {'agent_type_1': 'DHCP agent', 'availability_zone_1_1': 'az1'}]

  The bug is about the SQL clause "GROUP BY" in PostgreSQL requires the
  presence of all fields provided in the "SELECT" clause; this is not
  happening in MariaDB not MySQL.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2086787/+subscriptions



References