yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94304
[Bug 2072567] Re: neutron-ovn-tempest-postgres-full job fails as oslo_db.exception.DBError: (psycopg2.errors.GroupingError) column "standardattributes_1.id" must appear in the GROUP BY clause or be used in an aggregate function
Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/923926
Committed: https://opendev.org/openstack/neutron-lib/commit/7f702af482b6b47f2fe74a8b475fb2a23cb5f7a4
Submitter: "Zuul (22348)"
Branch: master
commit 7f702af482b6b47f2fe74a8b475fb2a23cb5f7a4
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Thu Jul 11 05:58:14 2024 +0000
Change the ``StandardAttribute`` load method to "selectin"
This load method will remove the ``StandardAttribute`` load from the
resource main query and PostgreSQL won't require it to be in the
GROUP BY clause.
Closes-Bug: #2072567
Change-Id: I17a455e19c4bbbc45e26dee88849ab5e0b4b5d65
** Changed in: neutron
Status: In Progress => 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/2072567
Title:
neutron-ovn-tempest-postgres-full job fails as
oslo_db.exception.DBError: (psycopg2.errors.GroupingError) column
"standardattributes_1.id" must appear in the GROUP BY clause or be
used in an aggregate function
Status in neutron:
Fix Released
Bug description:
Started failing with recent change to switch to selectin strategy
https://review.opendev.org/q/I2e4fa0ffd2ad091ab6928bdf0d440b082c37def2
Fails as:-
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: FROM subnetpools LEFT OUTER JOIN subnetpoolrbacs ON subnetpools.id = subnetpoolrbacs.object_id LEFT OUTER JOIN standardattributes AS standardattributes_1 ON standardattributes_1.id = subnetpools.standard_attr_id
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: WHERE (subnetpools.project_id = %(project_id_1)s OR subnetpoolrbacs.action IN (%(action_1_1)s, %(action_1_2)s) AND (subnetpoolrbacs.target_project = %(target_project_1)s OR subnetpoolrbacs.target_project = %(target_project_2)s)) AND subnetpools.id = %(id_1)s GROUP BY subnetpools.id]
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: [parameters: {'project_id_1': '35a6ccdd5c06421aad1ae532529866d5', 'target_project_1': '35a6ccdd5c06421aad1ae532529866d5', 'target_project_2': '*', 'id_1': 'a4befd4d-bc92-4ac4-942d-d486f530f448', 'action_1_1': 'access_as_shared', 'action_1_2': 'access_as_readonly'}]
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: (Background on this error at: https://sqlalche.me/e/14/f405)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource Traceback (most recent call last):
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self.dialect.do_execute(
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource psycopg2.errors.GroupingError: column "standardattributes_1.id" must appear in the GROUP BY clause or be used in an aggregate function
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource LINE 1: ...standard_attr_id AS subnetpools_standard_attr_id, standardat...
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource ^
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource The above exception was the direct cause of the following exception:
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource Traceback (most recent call last):
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 98, in resource
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource result = method(request=request, **args)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/tagging.py", line 165, in update
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource result = self.plugin.update_tag(ctx, res, res_id, id)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_log/helpers.py", line 67, in wrapper
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return method(*args, **kwargs)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/api.py", line 223, in wrapped
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return f_with_retry(*args, **kwargs,
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/api.py", line 137, in wrapped
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource with excutils.save_and_reraise_exception():
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 227, in __exit__
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self.force_reraise()
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 200, in force_reraise
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource raise self.value
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/api.py", line 135, in wrapped
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return f(*args, **kwargs)
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/api.py", line 144, in wrapper
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource with excutils.save_and_reraise_exception() as ectxt:
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 227, in __exit__
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self.force_reraise()
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 200, in force_reraise
Jul 09 03:23:24.371323 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource raise self.value
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/api.py", line 142, in wrapper
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return f(*args, **kwargs)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/api.py", line 183, in wrapped
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource with excutils.save_and_reraise_exception():
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 227, in __exit__
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self.force_reraise()
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_utils/excutils.py", line 200, in force_reraise
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource raise self.value
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/api.py", line 181, in wrapped
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/services/tag/tag_plugin.py", line 105, in update_tag
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource res = self._get_resource(context, resource, resource_id)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 998, in wrapper
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return fn(*args, **kwargs)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/neutron/neutron/services/tag/tag_plugin.py", line 57, in _get_resource
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return model_query.get_by_id(context, model, resource_id)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/neutron_lib/db/model_query.py", line 178, in get_by_id
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return query.filter(model.id == object_id).one()
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2870, in one
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return self._iter().one()
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource result = self.session.execute(
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1717, in execute
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource result = conn._execute_20(statement, params or {}, execution_options)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return meth(self, args_10style, kwargs_10style, execution_options)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource return connection._execute_clauseelement(
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource ret = self._execute_context(
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self._handle_dbapi_exception(
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2132, in _handle_dbapi_exception
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource util.raise_(newraise, with_traceback=exc_info[2], from_=e)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource raise exception
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource self.dialect.do_execute(
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource File "/opt/stack/data/venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource oslo_db.exception.DBError: (psycopg2.errors.GroupingError) column "standardattributes_1.id" must appear in the GROUP BY clause or be used in an aggregate function
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource LINE 1: ...standard_attr_id AS subnetpools_standard_attr_id, standardat...
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource ^
Jul 09 03:23:24.374919 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource [SQL: SELECT subnetpools.shared AS subnetpools_shared, subnetpools.project_id AS subnetpools_project_id, subnetpools.id AS subnetpools_id, subnetpools.name AS subnetpools_name, subnetpools.ip_version AS subnetpools_ip_version, subnetpools.default_prefixlen AS subnetpools_default_prefixlen, subnetpools.min_prefixlen AS subnetpools_min_prefixlen, subnetpools.max_prefixlen AS subnetpools_max_prefixlen, subnetpools.is_default AS subnetpools_is_default, subnetpools.default_quota AS subnetpools_default_quota, subnetpools.hash AS subnetpools_hash, subnetpools.address_scope_id AS subnetpools_address_scope_id, subnetpools.standard_attr_id AS subnetpools_standard_attr_id, standardattributes_1.id AS standardattributes_1_id, standardattributes_1.resource_type AS standardattributes_1_resource_type, standardattributes_1.description AS standardattributes_1_description, standardattributes_1.revision_number AS standardattributes_1_revision_number, standardattributes_1.created_at AS standardattributes_1_created_at, standardattributes_1.updated_at AS standardattributes_1_updated_at
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource FROM subnetpools LEFT OUTER JOIN subnetpoolrbacs ON subnetpools.id = subnetpoolrbacs.object_id LEFT OUTER JOIN standardattributes AS standardattributes_1 ON standardattributes_1.id = subnetpools.standard_attr_id
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource WHERE (subnetpools.project_id = %(project_id_1)s OR subnetpoolrbacs.action IN (%(action_1_1)s, %(action_1_2)s) AND (subnetpoolrbacs.target_project = %(target_project_1)s OR subnetpoolrbacs.target_project = %(target_project_2)s)) AND subnetpools.id = %(id_1)s GROUP BY subnetpools.id]
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource [parameters: {'project_id_1': '35a6ccdd5c06421aad1ae532529866d5', 'target_project_1': '35a6ccdd5c06421aad1ae532529866d5', 'target_project_2': '*', 'id_1': 'a4befd4d-bc92-4ac4-942d-d486f530f448', 'action_1_1': 'access_as_shared', 'action_1_2': 'access_as_readonly'}]
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource (Background on this error at: https://sqlalche.me/e/14/f405)
Jul 09 03:23:24.378660 np0037931415 neutron-server[57018]: ERROR neutron.api.v2.resource
Example failure:-
https://0d025ec9ac990df9df3d-ac3ccef21d826b266732233bd6611b5a.ssl.cf2.rackcdn.com/periodic/opendev.org/openstack/neutron/stable/2024.1/neutron-
ovn-tempest-postgres-full/6d90248/testr_results.html
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2072567/+subscriptions
References