neutron-fwaas Percona-XtraDB-Cluster prohibits use of DML command on a table (neutron.firewall_group_port_associations_v2) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER'

Bug #1862836 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
New
Undecided
Unassigned
neutron-fwaas (Ubuntu)
New
Undecided
Unassigned

Bug Description

When trying to delete a heat stack in Stein fails, because neutron-server couldn't update firewall groups, the stack trace found in the logs is:

2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager Traceback (most recent call last):
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_lib/callbacks/manager.py", line 197, in _notify_loop
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager callback(resource, event, trigger, **kwargs)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_fwaas/services/firewall/fwaas_plugin_v2.py", line 307, in handle_update_port
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager {'firewall_group': {'ports': port_ids}})
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/oslo_log/helpers.py", line 67, in wrapper
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager return method(*args, **kwargs)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_fwaas/services/firewall/fwaas_plugin_v2.py", line 369, in update_firewall_group
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager return self.driver.update_firewall_group(context, id, firewall_group)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_fwaas/services/firewall/service_drivers/driver_api.py", line 211, in update_firewall_group
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager context, id, firewall_group_delta)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_fwaas/db/firewall/v2/firewall_db_v2.py", line 981, in update_firewall_group
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager self._delete_ports_in_firewall_group(context, id)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/neutron_fwaas/db/firewall/v2/firewall_db_v2.py", line 832, in _delete_ports_in_firewall_group
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager firewall_group_id=firewall_group_id).delete()
[...]
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager File "/usr/lib/python3/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager raise errorclass(errno, errval)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager oslo_db.exception.DBError: (pymysql.err.InternalError) (1105, 'Percona-XtraDB-Cluster prohibits use of DML command on a table (neutron.firewall_group_port_associations_v2) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER') [SQL: 'DELETE FROM firewall_group_port_associations_v2 WHERE firewall_group_port_associations_v2.firewall_group_id = %(firewall_group_id_1)s'] [parameters: {'firewall_group_id_1': '8da85bcb-1e1d-4d5a-b508-25c1d4c85d50'}] (Background on this error at: http://sqlalche.me/e/2j85)
2020-02-11 13:14:21.356 1998511 ERROR neutron_lib.callbacks.manager

Tags: sts
Revision history for this message
Felipe Reyes (freyes) wrote :

This error is similar to the one reported in Octavia https://bugs.launchpad.net/ubuntu/+source/octavia/+bug/1826875 , but in the case of neutron the table firewall_group_port_associations_v2 has a primary key defined:

firewall_group_port_associations_v2 | CREATE TABLE `firewall_group_port_associations_v2` (
  `firewall_group_id` varchar(36) NOT NULL,
  `port_id` varchar(36) NOT NULL,
  PRIMARY KEY (`firewall_group_id`,`port_id`),
  UNIQUE KEY `uniq_firewallgroupportassociation0port_id` (`port_id`),
  CONSTRAINT `firewall_group_port_associations_v2_ibfk_1` FOREIGN KEY (`firewall_group_id`) REFERENCES `firewall_groups_v2` (`id`) ON DELETE CASCADE,
  CONSTRAINT `firewall_group_port_associations_v2_ibfk_2` FOREIGN KEY (`port_id`) REFERENCES `ports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8

tags: added: sts
description: updated
no longer affects: neutron (Ubuntu)
Felipe Reyes (freyes)
no longer affects: neutron
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.