[stein] 'Percona-XtraDB-Cluster prohibits use of DML command on a table (octavia.spares_pool) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
Medium
|
Unassigned | ||
Stein |
Fix Released
|
Medium
|
Unassigned | ||
octavia |
Fix Released
|
Undecided
|
Sahid Orentino | ||
octavia (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Installed Octavia via charm-octavia using bionic-stein.
When the charm tried to execute a database migration
sudo octavia-db-manage upgrade head
it failed with the following error:
2019-04-29 11:49:20.096 22569 ERROR octavia-db-manage sqlalchemy.
It looks like the spares_pool table doesn't have a primary key.
mysql> DESCRIBE spares_pool;
+------
| Field | Type | Null | Key | Default | Extra |
+------
| updated_at | datetime | YES | | CURRENT_TIMESTAMP | |
+------
1 row in set (0.00 sec)
mysql> show variables like 'pxc_strict_mode';
+------
| Variable_name | Value |
+------
| pxc_strict_mode | ENFORCING |
+------
1 row in set (0.00 sec)
This spares_pool table was added quite recently (in Stein):
git --no-pager log -S spares_pool | grep -v Author
commit 0b468090e6eef14
Date: Tue Apr 2 18:05:52 2019 +0200
Fix spare amphora check and creation
This patch fixes an issue when the SparesPool table is empty that blocks
spare amphorae creation. It creates a new spares pool entry if the table
is empty.
Story 2005352
Task 30306
Change-Id: I0ce2778277640e
commit a205ab3ebe4ae14
Date: Mon Mar 11 17:06:15 2019 -0700
Limit spares pool to the spare_amphora_
This patch fixes a bug where the housekeeping controllers may launch
more spare amphora than the spare_amphora_
Story: 2003094
Task 23186
Change-Id: I4c98b3442d2471
➜ octavia git:(master) git --no-pager branch --contains=
* master
stable/stein
Upstream bug: https:/
description: | updated |
description: | updated |
Changed in octavia (Ubuntu Disco): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in octavia (Ubuntu Eoan): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Based on the table definition I guess we can argue about the usage of a PK.
Beside of that, the model well define the primary_key on 'updated_at'. I proposed a patch upstream [0] to fix the table definition, let see what the community is saying.
[0] https:/ /review. opendev. org/#/c/ 656459/