Skip to content

unable run coriolis-dbsync DB migrations failing from 13->14 migration script #381

@rajivreddy

Description

@rajivreddy

While setting up coriolis with a MySQL as backend

and running

coriolis-dbsync --config-file /etc/coriolis/coriolis.conf -d --nodebug

getting below error

2026-01-08 03:16:23.769 5736 INFO migrate.versioning.api [-] done
2026-01-08 03:16:23.769 5736 INFO migrate.versioning.api [-] 13 -> 14...
2026-01-08 03:16:23.778 5736 CRITICAL coriolis [-] Unhandled error: oslo_db.exception.DBMigrationError: (pymysql.err.OperationalError) (1005, 'Can\'t create table `coriolis`.`endpoint_region_mapping` (errno: 150 "Foreign key constraint is incorrectly formed")')
[SQL:
CREATE TABLE endpoint_region_mapping (
	id VARCHAR(36) NOT NULL,
	endpoint_id VARCHAR(36) NOT NULL,
	region_id VARCHAR(36) NOT NULL,
	created_at DATETIME,
	updated_at DATETIME,
	deleted_at DATETIME,
	deleted VARCHAR(36),
	PRIMARY KEY (id),
	FOREIGN KEY(endpoint_id) REFERENCES endpoint (id),
	FOREIGN KEY(region_id) REFERENCES region (id)
)

]

config file

[database]
connection = mysql+pymysql://coriolis:mysecretpassword@localhost/coriolis?charset=utf8

UTF8 encoding issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions