My understanding (e.g. from #comment 1 of this bug: https://bugs.launchpad.net/grenade/+bug/1761775) is that --local-cell updates only the database specified as connection in [database], i.e. not also the cell0 database On Tue, Jul 16, 2019 at 1:12 PM Eugen Block <eblock@nde.ag> wrote:
AFAIK cell0 is the local cell, isn't it? I'm not sure, maybe someone else can shed some light on this.
Zitat von Massimo Sgaravatto <massimo.sgaravatto@gmail.com>:
Mmm. Doesn't "--local_cell" mean that cell0 is not updated ? I was already using cell0 in Ocata ...
Cheers, Massimo
On Tue, Jul 16, 2019 at 12:52 PM Eugen Block <eblock@nde.ag> wrote:
Hi,
I think you need to run
nova-manage db sync --local_cell
in Ocata. I can't quite remember the reason, but you should try it. I had the same problems and this command worked out for me.
Regards, Eugen
Zitat von Massimo Sgaravatto <massimo.sgaravatto@gmail.com>:
Resending with the right tags in the subject line ...
Hi
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@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:
[database] connection = mysql+pymysql:// nova_prod:xyz@192.168.60.10:6306/nova_prod [api_database] connection = mysql+pymysql:// nova_api_prod:xyz@192.168.60.10:6306/nova_api_prod
I can't see problems accessing the databases. i.e. these commands work:
mysql -u nova_api_prod -pxyz -h 192.168.60.10 -P 6306 nova_api_prod
mysql -u nova_prod -pxyz -h 192.168.60.10 -P 6306 nova_prod
mysql -u nova_prod -pxyz -h 192.168.60.10 -P 6306 nova_prod_cell0
If I try to rerun nova-manage cell_v2 map_cell0:
[root@cld-ctrl-01 ~]# nova-manage cell_v2 map_cell0 Cell0 is already setup
[root@cld-ctrl-01 ~]# su -s /bin/sh -c "nova-manage api_db version" nova 45
[root@cld-ctrl-01 ~]# su -s /bin/sh -c "nova-manage db version" nova 362
[root@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:****@ 192.168.60.10:6306/nova_prod_cell0 | | cell1 | 5e42faa0-710b-4967-bb42-fcf53602c96e | rabbit://openstack_prod:****@192.168.60.183:5672 | mysql+pymysql://nova_prod:****@192.168.60.10:6306/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 file:
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__ /usr/lib/python2.7/site-packages/migrate/versioning/repository.py:83
Any hints ?
Thanks, Massimo   OpenStack Discuss