I am having problems when populate magnum database, please help me.
I have followed the docs.
https://docs.openstack.org/magnum/train/install/install-rdo.html
sudo su -s /bin/sh -c "magnum-db-manage upgrade" magnum
/usr/lib/python2.7/site-packages/pymysql/cursors.py:170: Warning: (3719, u"'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.") result = self._query(query) INFO alembic.runtime.migration Context impl MySQLImpl. INFO alembic.runtime.migration Will assume non-transactional DDL. INFO alembic.runtime.migration Running upgrade -> 2581ebaf0cb2, initial migration INFO alembic.runtime.migration Running upgrade 2581ebaf0cb2 -> 3bea56f25597, Multi Tenant Support INFO alembic.runtime.migration Running upgrade 3bea56f25597 -> 5793cd26898d, Add bay status INFO alembic.runtime.migration Running upgrade 5793cd26898d -> 3a938526b35d, Add docker volume size column INFO alembic.runtime.migration Running upgrade 3a938526b35d -> 35cff7c86221, add private network to baymodel INFO alembic.runtime.migration Running upgrade 35cff7c86221 -> 1afee1db6cd0, Add master flavor INFO alembic.runtime.migration Running upgrade 1afee1db6cd0 -> 2d1354bbf76e, ssh authorized key INFO alembic.runtime.migration Running upgrade 2d1354bbf76e -> 29affeaa2bc2, rename-bay-master-address INFO alembic.runtime.migration Running upgrade 29affeaa2bc2 -> 2ace4006498, rename-bay-minions-address INFO alembic.runtime.migration Running upgrade 2ace4006498 -> 456126c6c9e9, create baylock table INFO alembic.runtime.migration Running upgrade 456126c6c9e9 -> 4ea34a59a64c, add-discovery-url-to-bay INFO alembic.runtime.migration Running upgrade 4ea34a59a64c -> e772b2598d9, add-container-command INFO alembic.runtime.migration Running upgrade e772b2598d9 -> 2d8657c0cdc, add bay uuid INFO alembic.runtime.migration Running upgrade 2d8657c0cdc -> 4956f03cabad, add cluster distro INFO alembic.runtime.migration Running upgrade 4956f03cabad -> 592131657ca1, Add coe column to BayModel INFO alembic.runtime.migration Running upgrade 592131657ca1 -> 3b6c4c42adb4, Add unique constraints INFO alembic.runtime.migration Running upgrade 3b6c4c42adb4 -> 2b5f24dd95de, rename service port INFO alembic.runtime.migration Running upgrade 2b5f24dd95de -> 59e7664a8ba1, add_container_status INFO alembic.runtime.migration Running upgrade 59e7664a8ba1 -> 156ceb17fb0a, add_bay_status_reason INFO alembic.runtime.migration Running upgrade 156ceb17fb0a -> 1c1ff5e56048, rename_container_image_id INFO alembic.runtime.migration Running upgrade 1c1ff5e56048 -> 53882537ac57, add host column to pod INFO alembic.runtime.migration Running upgrade 53882537ac57 -> 14328d6a57e3, add master count to bay INFO alembic.runtime.migration Running upgrade 14328d6a57e3 -> 421102d1f2d2, create x509keypair table INFO alembic.runtime.migration Running upgrade 421102d1f2d2 -> 6f21dc998bb, Add master_addresses to bay INFO alembic.runtime.migration Running upgrade 6f21dc998bb -> 966a99e70ff, add-proxy INFO alembic.runtime.migration Running upgrade 966a99e70ff -> 6f21dc920bb, Add cert_uuuid to bay INFO alembic.runtime.migration Running upgrade 6f21dc920bb -> 5518af8dbc21, Rename cert_uuid INFO alembic.runtime.migration Running upgrade 5518af8dbc21 -> 4e263f236334, Add registry_enabled INFO alembic.runtime.migration Running upgrade 4e263f236334 -> 3be65537a94a, add_network_driver_baymodel_column INFO alembic.runtime.migration Running upgrade 3be65537a94a -> 1481f5b560dd, add labels column to baymodel table INFO alembic.runtime.migration Running upgrade 1481f5b560dd -> 1d045384b966, add-insecure-baymodel-attr INFO alembic.runtime.migration Running upgrade 1d045384b966 -> 27ad304554e2, adding magnum_service functionality INFO alembic.runtime.migration Running upgrade 27ad304554e2 -> 5ad410481b88, rename-insecure /usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py:78: SAWarning: An exception has occurred during handling of a previous exception. The previous exception is: <class 'pymysql.err.InternalError'> (3959, u"Check constraint 'baymodel_chk_2' uses column 'insecure', hence column cannot be dropped or renamed.")
This is a bug when running Magnum on MySQL 8.0. This bug was just recently fixed. https://github.com/openstack/magnum/commit/8dcf91b2d3f04b7b5cb0e7711d82438b69f975a1
You will need to either run an older version of MySQL, or apply the above patch. It has been backported to Victoria, so going with Victoria would be your easiest path forward.