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.exc.InternalError: (pymysql.err.InternalError) (1105, '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') [SQL: 'INSERT INTO spares_pool (updated_at) VALUES (%(updated_at)s)'] [parameters: {'updated_at': datetime.datetime(2019, 4, 29, 11, 49, 20, 94405)}] (Background on this error at: http://sqlalche.me/e/2j85)
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)
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.
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. exc.InternalErr or: (pymysql. err.InternalErr or) (1105, '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') [SQL: 'INSERT INTO spares_pool (updated_at) VALUES (%(updated_at)s)'] [parameters: {'updated_at': datetime. datetime( 2019, 4, 29, 11, 49, 20, 94405)}] (Background on this error at: http:// sqlalche. me/e/2j85)
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)
This table was added quite recently (in Stein):
git --no-pager log -S spares_pool | grep -v Author 83f6f7c53708f50 0802a57d51
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 e9e509c709bf862 1b8b025d6d3
commit a205ab3ebe4ae14 668f25328c062f9 383d6c69cb
Date: Mon Mar 11 17:06:15 2019 -0700
Limit spares pool to the spare_amphora_ pool_size
This patch fixes a bug where the housekeeping controllers may launch pool_size setting.
more spare amphora than the spare_amphora_
Story: 2003094
Task 23186
Change-Id: I4c98b3442d2471 662488184fa7e91 ac64ec33279
➜ octavia git:(master) git --no-pager branch --contains= a205ab3ebe4ae14 668f25328c062f9 383d6c69cb
* master
stable/stein