Bootstrap DB fail : SQL syntax error

Bug #1773942 reported by Kevin Tibi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Invalid
Undecided
Unassigned

Bug Description

Hi,

I try to deploy designate with kolla. Since I builded new image, I can't boostrap the BDD.

The migration 98 fail :

2018-05-29 10:40:54.853 16 INFO migrate.versioning.api [designate-manage - - - - -] 97 -> 98...
2018-05-29 10:40:54.864 16 CRITICAL designate [designate-manage - - - - -] Unhandled error: DbMigrationError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB
 server version for the right syntax to use near 'ALTER TABLE service_statuses CONVERT TO CHARACTER SET utf8;\n SET foreign_key_' at line 2") [SQL: 'SET foreign_key_checks = 0;\n ALTER TABLE service_statuses CONVERT TO CHARACTER SE
T utf8;\n SET foreign_key_checks = 1;\n ALTER DATABASE designate DEFAULT CHARACTER SET utf8;\n ']
2018-05-29 10:40:54.864 16 ERROR designate Traceback (most recent call last):
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/bin/designate-manage", line 10, in <module>
2018-05-29 10:40:54.864 16 ERROR designate sys.exit(main())
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/lib/python2.7/site-packages/designate/cmd/manage.py", line 132, in main
2018-05-29 10:40:54.864 16 ERROR designate fn(*fn_args)
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/lib/python2.7/site-packages/designate/manage/database.py", line 63, in sync
2018-05-29 10:40:54.864 16 ERROR designate get_manager().upgrade(None)
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration_cli/manager.py", line 65, in upgrade
2018-05-29 10:40:54.864 16 ERROR designate results.append(plugin.upgrade(None))
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration_cli/ext_migrate.py", line 47, in upgrade
2018-05-29 10:40:54.864 16 ERROR designate init_version=self.init_version)
2018-05-29 10:40:54.864 16 ERROR designate File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration.py", line 81, in db_sync
2018-05-29 10:40:54.864 16 ERROR designate raise exception.DbMigrationError(ex)
2018-05-29 10:40:54.864 16 ERROR designate DbMigrationError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near
'ALTER TABLE service_statuses CONVERT TO CHARACTER SET utf8;\n SET foreign_key_' at line 2") [SQL: 'SET foreign_key_checks = 0;\n ALTER TABLE service_statuses CONVERT TO CHARACTER SET utf8;\n SET foreign_key_checks = 1;\n ALT
ER DATABASE designate DEFAULT CHARACTER SET utf8;\n ']

The version of pymysql is 0.8.0 . I can see the commit c1a77a3ae00a04e564a2cc3f332f9a4c764584b5 which change the migration 98 and maybe introduce the bug.

Revision history for this message
Kevin Tibi (ktibi) wrote :

pip list of my designate container

Revision history for this message
Kevin Tibi (ktibi) wrote :

RDO package doesn't include the fix c1a77a3ae00a04e564a2cc3f332f9a4c764584b5

Works with this FIx.

Changed in designate:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.