[murano] Galera Table package_to_tag has no PRIMARY_KEY

Marc Vorwerk openstack at gmx.net
Thu Apr 18 08:18:34 UTC 2019


Hi Rong,

 

thank you for your answer!

 

I will test it with changing the pxc_strict_mode.

 

But in your second link I can read that it would be better to add a PRIMARY_KEY to the table?

 

Best regards,

 

Marc

 

 

Von: Rong Zhu <aaronzhu1121 at gmail.com>
Datum: Donnerstag, 18. April 2019 um 09:40
An: <openstack-discuss at lists.openstack.org>
Betreff: Re: [murano] Galera Table package_to_tag has no PRIMARY_KEY

 

Hi Marc,

 

 

Glad to hear you are using murano.

I googled this, the reason is Percona using pxc_strict_mode = ENFORCING will catch error when table without primary keys. package_to_tag table don't have a primary key. I think you can set the mode Permissive.

 

[0] https://www.percona.com/doc/percona-xtradb-cluster/LATEST/features/pxc-strict-mode.html

[1] https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/47107-dml-command-rejected-when-pxc-mode-set-to-enforcing

 

 

Thanks,

Rong Zhu

 

Marc Vorwerk <openstack at gmx.net>于2019年4月18日 周四15:19写道:

Hello,

 

uploading an application to Murano fails after upgrading "percona-xtradb-cluster-common-5.6" to "percona-xtradb-cluster-common-5.7":

 

Importing package io.murano

Error {"explanation": "The server has either erred or is incapable of performing the requested operation.", "code": 500, "error": {"message": "(pymysql.err.InternalError) (1105, u'Percona-XtraDB-Cluster prohibits use of DML command on a table (murano.package_to_tag) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER') [SQL: u'INSERT INTO package_to_tag (package_id, tag_id) VALUES (%(package_id)s, %(tag_id)s)'] [parameters: {'package_id': 'a345ab1fe4924aaf8ed32f954a6fe32d', 'tag_id': '0cb3765d7fe1486ba9741f4eb9b2a437'}]", "traceback": null, "type": "DBError"}, "title": "Internal Server Error"} (HTTP 500) occurred while installing package io.murano

 

If i looks on the galera table, i get the following information:

 

$ mysql -u murano -p

 

mysql> Use murano;

mysql> INSERT INTO package_to_tag (package_id, tag_id) VALUES (a345ab1fe4924aaf8ed32f954a6fe32d, 0cb3765d7fe1486ba9741f4eb9b2a437);

ERROR 1105 (HY000): Percona-XtraDB-Cluster prohibits use of DML command on a table (murano.package_to_tag) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

mysql> SHOW KEYS FROM package_to_tag WHERE Key_name = 'PRIMARY';

Empty set (0.00 sec)

 

My package list:

 

$pkg -l | grep -e mysql -e percona

root at control02ve:~# dpkg -l | grep -e mysql -e percona

ii  libdbd-mysql-perl                     4.033-1ubuntu0.1                           amd64        Perl5 database interface to the MySQL database

ii  libmysqlclient20:amd64                5.7.25-0ubuntu0.16.04.2                    amd64        MySQL database client library

ii  mysql-common                          5.7.25-0ubuntu0.16.04.2                    all          MySQL database common files, e.g. /etc/mysql/my.cnf

ii  percona-release                       1.0-11.generic                             all          Package to install Percona gpg key and APT repos

ii  percona-xtrabackup-24                 2.4.13-1.xenial                            amd64        Open source backup tool for InnoDB and XtraDB

ii  percona-xtradb-cluster-client-5.7     5.7.25-31.35-1.xenial                      amd64        Percona XtraDB Cluster database client binaries

ii  percona-xtradb-cluster-common-5.7     5.7.25-31.35-1.xenial                      amd64        Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)

ii  percona-xtradb-cluster-galera-3.x     3.32-1.xenial                              amd64        Galera components of Percona XtraDB Cluster

ii  percona-xtradb-cluster-server-5.7     5.7.25-31.35-1.xenial                      amd64        Percona XtraDB Cluster database server binaries

ii  python-mysqldb                        1.3.7-1build2                              amd64        Python interface to MySQL

ii  python-pymysql                        0.7.11-1~cloud0                            all          Pure-Python MySQL driver - Python 2.x

 

Murano is installed in the latest version of queens (https://github.com/openstack/murano/tree/stable/queens).

 

Has anyone an idea?

 

Best Regards,

Marc

 

-- 

Thanks,
Rong Zhu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190418/6662037f/attachment-0001.html>


More information about the openstack-discuss mailing list