From 61b2917a3e8596cbb4074024cee0844e319ed551 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 3 Feb 2023 21:06:00 +0100 Subject: [PATCH] Filter subnets by "enable_dhcp" flag using the correct type While other SQL engines can compare interger and boolean types, PostgreSQL needs explicit casting to compare variables. Method "_sync_subnet_dhcp_options" is currently raising the following error: operator does not exist: boolean = integer Closes-Bug: #2004581 Change-Id: I715029c311c4516f3212054c5c72533b12fd0986 --- .../plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py index bb6a11500b0..0a307f78ee2 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py @@ -778,7 +778,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer): LOG.debug('OVN-NB Sync DHCP options for Neutron subnets started') db_subnets = {} - filters = {'enable_dhcp': [1]} + filters = {'enable_dhcp': [True]} for subnet in self.core_plugin.get_subnets(ctx, filters=filters): if (subnet['ip_version'] == constants.IP_VERSION_6 and subnet.get('ipv6_address_mode') == constants.IPV6_SLAAC):