[nova] [ops] Problems running db sync for nova (Ocata --> Pike)

Massimo Sgaravatto massimo.sgaravatto at gmail.com
Tue Jul 16 10:43:01 UTC 2019

Resending with the right tags in the subject line ...


We are trying to update our Ocata cloud to Pike  (this is the first step:
we will go through Ocata --> Pike --> Queens --> Rocky) but we have a
problem with nova-manage db sync:

[root at cld-ctrl-01 ~]# su -s /bin/sh -c "nova-manage db sync" nova
ERROR: Could not access cell0.
Has the nova_api database been created?
Has the nova_cell0 database been created?
Has "nova-manage api_db sync" been run?
Has "nova-manage cell_v2 map_cell0" been run?
Is [api_database]/connection set in nova.conf?
Is the cell0 database connection URL correct?
Error: "Database schema file with version 390 doesn't exist."

We have these settings in nova.conf:

connection = mysql+pymysql://nova_prod:xyz@
connection = mysql+pymysql://
nova_api_prod:xyz at

I can't see problems accessing the databases. i.e. these commands work:

mysql -u nova_api_prod -pxyz -h -P 6306 nova_api_prod

mysql -u nova_prod -pxyz -h -P 6306 nova_prod

 mysql -u nova_prod -pxyz -h -P 6306 nova_prod_cell0

If I try to rerun nova-manage cell_v2 map_cell0:

[root at cld-ctrl-01 ~]# nova-manage cell_v2 map_cell0
Cell0 is already setup

[root at cld-ctrl-01 ~]# su -s /bin/sh -c "nova-manage api_db version" nova

[root at cld-ctrl-01 ~]# su -s /bin/sh -c "nova-manage db version" nova

[root at cld-ctrl-01 ~]# nova-manage cell_v2 list_cells
|  Name |                 UUID                 |                  Transport
URL                   |                        Database Connection
| cell0 | 00000000-0000-0000-0000-000000000000 |
none:///                     | mysql+pymysql://nova_prod:****@ |
| cell1 | 5e42faa0-710b-4967-bb42-fcf53602c96e |
rabbit://openstack_prod:****@ |
 mysql+pymysql://nova_prod:****@    |

Following some doc we also tried to specify the --database_connection /
--database-connection argument, but this seems not working

Setting nova in debug mode, this is the last entry in the nova-manage log

2019-07-16 12:11:42.774 22013 DEBUG migrate.versioning.repository
[req-8ca52407-dbe1-4a62-ad6c-16631c2a9a06 - - - - -] Config:
OrderedDict([('db_settings', OrderedDict([('__name__', 'db_settings'),
('repository_id', 'nova'), ('version_table', 'migrate_version'),
('required_dbs', '[]')]))]) __init__

Any hints ?

Thanks, Massimo

OpenStack Discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190716/f5ff0e36/attachment.html>

More information about the openstack-discuss mailing list