psycopg2.errors.UndefinedFunction: operator does not exist: character varying = text[]

Bug #2000064 reported by hard
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Neutron Dynamic Routing charm
Triaged
High
Unassigned

Bug Description

Release OpenStack - Yoga
OS Ubuntu 20.04
DB PostgreSQL 14

Package:
dpkg -l | grep neutr
ii neutron-common 2:20.2.0-0ubuntu1~cloud0 all Neutron is a virtual network service for Openstack - common
ii neutron-dynamic-routing-common 2:20.0.0-0ubuntu1~cloud0 all OpenStack Neutron Dynamic Routing - common files
ii neutron-fwaas-common 1:16.0.0+git2022033113.de8a4d4cf-0ubuntu1~cloud0 all Firewall-as-a-Service driver for OpenStack Neutron
ii neutron-plugin-ml2 2:20.2.0-0ubuntu1~cloud0 all Neutron is a virtual network service for Openstack - ML2 plugin
ii neutron-server 2:20.2.0-0ubuntu1~cloud0 all Neutron is a virtual network service for Openstack - server
ii python3-neutron 2:20.2.0-0ubuntu1~cloud0 all Neutron is a virtual network service for Openstack - Python library
ii python3-neutron-dynamic-routing 2:20.0.0-0ubuntu1~cloud0 all OpenStack Neutron Dynamic Routing - Python 3 library
ii python3-neutron-fwaas 1:16.0.0+git2022033113.de8a4d4cf-0ubuntu1~cloud0 all Firewall-as-a-Service driver for OpenStack Neutron
ii python3-neutron-lib 2.20.0-0ubuntu1~cloud0 all Neutron shared routines and utilities - Python 3.x
ii python3-neutronclient 1:7.8.0-0ubuntu1~cloud0 all client API library for Neutron - Python 3.x

Error in logs neutron-server:
2022-12-19 14:39:52.757 5007 WARNING oslo_db.sqlalchemy.exc_filters [req-f64b9016-945f-4bf1-aa43-89be877258fb 0855c4c3587b42959ecf2436d60826c0 e8a458c8de124595ae5ff93e38f41069 -
default default] DBAPIError exception wrapped.: psycopg2.errors.UndefinedFunction: operator does not exist: character varying = text[]
LINE 3: WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e...
                                                      ^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters self.dialect.do_execute(
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 732, in do_execute
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters psycopg2.errors.UndefinedFunction: operator does not exist: character varying = text[]
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters LINE 3: WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e...
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters ^
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters
2022-12-19 14:39:52.757 5007 ERROR oslo_db.sqlalchemy.exc_filters
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager [req-f64b9016-945f-4bf1-aa43-89be877258fb 0855c4c3587b42959ecf2436d60826c0 e8a458c8de124595ae5ff93e38f41069 - def
ault default] Error during notification for neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin.port_callback-130537 port, after_update: oslo_db.exception.DBError: (psycopg
2.errors.UndefinedFunction) operator does not exist: character varying = text[]
LINE 3: WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e...
                                                      ^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.

[SQL: SELECT bgp_speaker_network_bindings.bgp_speaker_id AS bgp_speaker_network_bindings_bgp_speaker_id
FROM bgp_speaker_network_bindings
WHERE bgp_speaker_network_bindings.network_id = %(network_id_1)s]
[parameters: {'network_id_1': ['06b0e583-64c8-450e-a506-8a1cf2c02f7e']}]
(Background on this error at: https://sqlalche.me/e/14/f405)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager Traceback (most recent call last):
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager self.dialect.do_execute(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 732, in do_execute
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager cursor.execute(statement, parameters)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager psycopg2.errors.UndefinedFunction: operator does not exist: character varying = text[]
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager LINE 3: WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e...
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager ^
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager The above exception was the direct cause of the following exception:
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager Traceback (most recent call last):
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_lib/callbacks/manager.py", line 181, in _notify_loop
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager callback(resource, event, trigger, payload=payload)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py", line 377, in port_cal
lback
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager self._get_bgp_speaker_ids_by_binding_network(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_dynamic_routing/db/bgp_db.py", line 312, in _get_bgp_speaker_ids_b
y_binding_network
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager return query.all()
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2759, in all
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager return self._iter().all()
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2894, in _iter
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager result = self.session.execute(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/orm/session.py", line 1692, in execute
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager result = conn._execute_20(statement, params or {}, execution_options)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1614, in _execute_20
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager return meth(self, args_10style, kwargs_10style, execution_options)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager return connection._execute_clauseelement(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1481, in _execute_clauseelement
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager ret = self._execute_context(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1845, in _execute_context
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager self._handle_dbapi_exception(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 2024, in _handle_dbapi_exception
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager util.raise_(newraise, with_traceback=exc_info[2], from_=e)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 207, in raise_
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager raise exception
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager self.dialect.do_execute(
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 732, in do_execute
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager cursor.execute(statement, parameters)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager oslo_db.exception.DBError: (psycopg2.errors.UndefinedFunction) operator does not exist: character varying = text[
]
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager LINE 3: WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e...
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager ^
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager [SQL: SELECT bgp_speaker_network_bindings.bgp_speaker_id AS bgp_speaker_network_bindings_bgp_speaker_id
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager FROM bgp_speaker_network_bindings
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager WHERE bgp_speaker_network_bindings.network_id = %(network_id_1)s]
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager [parameters: {'network_id_1': ['06b0e583-64c8-450e-a506-8a1cf2c02f7e']}]
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager (Background on this error at: https://sqlalche.me/e/14/f405)
2022-12-19 14:39:52.758 5007 ERROR neutron_lib.callbacks.manager

Error in DB log:
2022-12-19 14:39:52.755 MSK [47072] neutron@neutron ERROR: operator does not exist: character varying = text[] at character 181
2022-12-19 14:39:52.755 MSK [47072] neutron@neutron HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2022-12-19 14:39:52.755 MSK [47072] neutron@neutron STATEMENT: SELECT bgp_speaker_network_bindings.bgp_speaker_id AS bgp_speaker_network_bindings_bgp_speaker_id
        FROM bgp_speaker_network_bindings
        WHERE bgp_speaker_network_bindings.network_id = ARRAY['06b0e583-64c8-450e-a506-8a1cf2c02f7e']

Workaround or solution:

--- /usr/lib/python3/dist-packages/neutron_dynamic_routing/services/bgp/bgp_plugin.py 2022-03-30 14:52:09.000000000 +0300
+++ bgp_plugin.py 2022-12-19 15:44:26.886372121 +0300
@@ -375,7 +375,7 @@
                 for ext_net in ext_nets:
                     bgp_speakers = (
                         self._get_bgp_speaker_ids_by_binding_network(
- ctx, ext_nets))
+ ctx, ext_net))

                     # Refresh any affected BGP speakers
                     for bgp_speaker in bgp_speakers:

hard (ihard)
description: updated
hard (ihard)
description: updated
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

So the main issue here is that we (as in the OpenStack charms team) haven't actually released a neutron-dynamic-routing charm that supports zed, yoga and 2023.1. This is something we need to rectify.

However, the issue within the bug report looks like either a packaging dependency issue (e.g. mismatched dependencies in libraries), around what pyscopg2 supports, vs sqlaclchemy, etc. This will coming out (hopefully) in testing the newer versions.

Changed in charm-neutron-dynamic-routing:
status: New → Triaged
importance: Undecided → High
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.