Just setting up a test server and I’m trying to run a trial migration from an old LinOTP2 server, but I’m not able to save an LDAP Resolver. I entered all the config and ran a test, and it was successful. However when I click ‘Save’ I get this:
sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1062, "Duplicate entry '0' for key 'PRIMARY'")
[SQL: INSERT INTO machineresolverconfig (resolver_id, `Key`, `Value`, `Type`, `Description`) VALUES (%(resolver_id)s, %(Key)s, %(Value)s, %(Type)s, %(Description)s)]
[parameters: {'resolver_id': None, 'Key': 'TLS_VERIFY', 'Value': 'False', 'Type': 'bool', 'Description': ''}]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
ERROR:privacyidea.lib.auditmodules.sqlaudit:exception IntegrityError('(pymysql.err.IntegrityError) (1062, "Duplicate entry \\'0\\' for key \\'PRIMARY\\'")')
And in MySQL I see this:
MariaDB [pi]> select * from machineresolverconfig;
+----+-------------+----------+--------+--------+-------------+
| id | resolver_id | Key | Value | Type | Description |
+----+-------------+----------+--------+--------+-------------+
| 0 | NULL | AUTHTYPE | Simple | string | |
+----+-------------+----------+--------+--------+-------------+
1 row in set (0.001 sec)
If I truncate the table and try again it recreates the same entry.
Alright, it doesn’t like something about the latest version of MariaDB. I have no idea what, but I span up a MySQL 5.7 RDS instance instead and it’s happy. So that’s good. I guess I’ll raise an issue over in GitHub for the MariaDB thing.