fwaas_v2 - unable to associate port with firewall (PXC strict mode)

Bug #1831986 reported by James Page on 2019-06-07
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Medium
Unassigned
Rocky
Medium
Unassigned
Stein
Medium
Unassigned
Train
Medium
Unassigned
neutron
Undecided
James Page
neutron-fwaas (Ubuntu)
Medium
Unassigned
Disco
Medium
Unassigned
Eoan
Medium
Unassigned

Bug Description

Impacts both Stein and Rocky (although rocky does not enable v2 just yet).

542 a9761fa9124740028d0c1d70ff7aa542] DBAPIError exception wrapped from (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': '85a277d0-ebaf-4a5d-9d45-6a74b8f54372'}] (Background on this error at: http://sqlalche.me/e/2j85): 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')
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters context)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 509, in do_execute
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 165, in execute
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters result = self._query(query)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 321, in _query
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters conn.query(q)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 860, in query
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1061, in _read_query_result
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters result.read()
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1349, in read
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters first_packet = self.connection._read_packet()
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1018, in _read_packet
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters packet.check_error()
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 384, in check_error
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters err.raise_mysql_exception(self._data)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass(errno, errval)
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters 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')
2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: neutron-server 2:14.0.0-0ubuntu1.1~cloud0 [origin: Canonical]
ProcVersionSignature: Ubuntu 4.15.0-51.55-generic 4.15.18
Uname: Linux 4.15.0-51-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CrashDB:
 {
                "impl": "launchpad",
                "project": "cloud-archive",
                "bug_pattern_url": "http://people.canonical.com/~ubuntu-archive/bugpatterns/bugpatterns.xml",
             }
Date: Fri Jun 7 10:22:18 2019
Ec2AMI: ami-000005f0
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.blue
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: neutron
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.default.neutron-server: 2019-06-07T09:50:57.855385

James Page (james-page) wrote :
summary: - 542 a9761fa9124740028d0c1d70ff7aa542] DBAPIError exception wrapped from
- (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': '85a277d0
- -ebaf-4a5d-9d45-6a74b8f54372'}] (Background on this error at:
- http://sqlalche.me/e/2j85): 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') 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most
- recent call last): 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
- 2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- context) 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/sqlalchemy/engine/default.py", line 509, in do_execute
- 2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- cursor.execute(statement, parameters) 2019-06-07 10:07:50.937 30837
- ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/cursors.py", line 165, in execute 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters result =
- self._query(query) 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/cursors.py", line 321, in _query 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- conn.query(q) 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/connections.py", line 860, in query 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- self._affected_rows = self._read_query_result(unbuffered=unbuffered)
- 2019-06-07 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1061,
- in _read_query_result 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters result.read() 2019-06-07 10:07:50.937
- 30837 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3
- /dist-packages/pymysql/connections.py", line 1349, in read 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters first_packet
- = self.connection._read_packet() 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/connections.py", line 1018, in _read_packet 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- packet.check_error() 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/connections.py", line 384, in check_error 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
- err.raise_mysql_exception(self._data) 2019-06-07 10:07:50.937 30837
- ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python3/dist-
- packages/pymysql/err.py", line 107, in raise_mysql_exception 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters raise
- errorclass(errno, errval) 2019-06-07 10:07:50.937 30837 ERROR
- oslo_db.sqlalchemy.exc_filters 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') 2019-06-07
- 10:07:50.937 30837 ERROR oslo_db.sqlalchemy.exc_filters
+ fwaas_v2 - unable to associate port with firewall (PXC strict mode)
description: updated

Missing primary keys for firewall_group_port_associations_v2 and firewall_policy_rule_associations_v2. The workaround is to change the mode used [0].

  juju config percona-cluster pxc-strict-mode=PERMISSIVE

[0] https://bugs.launchpad.net/ubuntu/+source/octavia/+bug/1826875/comments/3

Changed in neutron:
assignee: nobody → Sahid Orentino (sahid-ferdjaoui)

Fix proposed to branch: master
Review: https://review.opendev.org/663931

Changed in neutron:
status: New → In Progress
James Page (james-page) on 2019-06-12
tags: added: py3
Changed in neutron:
assignee: Sahid Orentino (sahid-ferdjaoui) → James Page (james-page)
James Page (james-page) wrote :

As cosmic EOL's today not targeting for this fix.

James Page (james-page) on 2019-07-04
Changed in neutron-fwaas (Ubuntu Eoan):
status: New → Triaged
Changed in neutron-fwaas (Ubuntu Disco):
status: New → Triaged
importance: Undecided → Medium
Changed in neutron-fwaas (Ubuntu Eoan):
importance: Undecided → Medium
Changed in neutron:
assignee: James Page (james-page) → Sahid Orentino (sahid-ferdjaoui)
Changed in neutron:
assignee: Sahid Orentino (sahid-ferdjaoui) → James Page (james-page)
Changed in neutron:
assignee: James Page (james-page) → Sahid Orentino (sahid-ferdjaoui)
Changed in neutron:
assignee: Sahid Orentino (sahid-ferdjaoui) → James Page (james-page)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-fwaas - 1:15.0.0~rc1-0ubuntu3

---------------
neutron-fwaas (1:15.0.0~rc1-0ubuntu3) eoan; urgency=medium

  * d/p/add-missing-pk-firewall-group-associations-v2.patch: Cherry pick
    fix to resolve issue with missing primary key on
    firewall_group_associations_v2 table (LP: #1831986).

 -- James Page <email address hidden> Fri, 11 Oct 2019 14:19:24 +0100

Changed in neutron-fwaas (Ubuntu Eoan):
status: Triaged → Fix Released
James Page (james-page) on 2019-10-14
Changed in cloud-archive:
status: Triaged → Fix Committed
James Page (james-page) wrote :

This bug was fixed in the package neutron-fwaas - 1:15.0.0~rc1-0ubuntu3~cloud0
---------------

 neutron-fwaas (1:15.0.0~rc1-0ubuntu3~cloud0) bionic-train; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron-fwaas (1:15.0.0~rc1-0ubuntu3) eoan; urgency=medium
 .
   * d/p/add-missing-pk-firewall-group-associations-v2.patch: Cherry pick
     fix to resolve issue with missing primary key on
     firewall_group_associations_v2 table (LP: #1831986).

Changed in cloud-archive:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers