[Openstack-operators] nova_cell0 database connection string

Matt Riedemann mriedemos at gmail.com
Sat May 27 00:42:30 UTC 2017


On 5/26/2017 12:42 PM, Alfredo Moralejo Alonso wrote:
> According to https://docs.openstack.org/developer/nova/cells.html#first-time-setup
> you can specify database connection string with map_cell0 command:
> 
> nova-manage cell_v2 map_cell0 --database_connection \
>    mysql+pymysql://root:secretmysql@dbserver/nova_cell0?charset=utf8
> 
> Regards,
> 
> Alfredo
> 
> On Fri, May 26, 2017 at 5:15 PM, Massimo Sgaravatto
> <massimo.sgaravatto at gmail.com> wrote:
>> Thanks
>>
>> I guess you meant "nova db with cell0 appended" and not "nova_api db with
>> cell0 appended" as you wrote
>>
>> My use case is that I share the same percona cluster to host the databases
>> of multiple openstack installations. So if it is <nova-database-name>-cell0
>> this is fine. If instead it is hard-coded to nova-cell0,  we have a problem
>>
>> Thanks again, Massimo
>>
>>
>> 2017-05-26 17:04 GMT+02:00 Mike Lowe <jomlowe at iu.edu>:
>>>
>>> The whole cell thing tripped me up earlier this week.  From what I
>>> understand it’s hard coded in the upgrade scripts to be the same as the
>>> nova_api db with cell0 appended to the db name but there is a patch in to
>>> change this behavior to match what the install docs say.  So it looks like
>>> if you just put the nova_cell0 db on the same host and make the credentials
>>> match your nova db everything will just work out.  You can double check by
>>> looking at the cell_mapping table entries in your nova_api db.
>>>
>>>
>>> On May 26, 2017, at 10:56 AM, Massimo Sgaravatto
>>> <massimo.sgaravatto at gmail.com> wrote:
>>>
>>> Hi
>>>
>>> I am reading the RDO installation guide for Ocata. In the nova section [*]
>>> it is explained how to create the nova_cell0 database, but I can't find how
>>> to set the relevant connection string in the nova configuration file.
>>> Any hints ?
>>> Thanks, Massimo
>>>
>>>
>>> [*]
>>>
>>> https://docs.openstack.org/ocata/install-guide-rdo/nova-controller-install.html
>>> _______________________________________________
>>> OpenStack-operators mailing list
>>> OpenStack-operators at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>>
>>>
>>
>>
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>
> 
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> 

See:

http://lists.openstack.org/pipermail/openstack-operators/2017-May/013565.html

nova-manage cell_v2 simple_cell_setup and nova-manage cell_v2 map_cell0 
would originally default the cell0 DB name in the connection URL to be 
<api db name>_cell0, which for most was nova_api_cell0. That was wrong, 
and fixed in ocata and backported and merged to newton this week, and in 
the proposed newton release mentioned in that email above.

^ was if you didn't override this auto-behavior by passing the 
connection URL in on the command line. So that's one workaround.

In the end, what we expect is your cell0 db name to be nova_cell0 and 
the cell_mappings.database_connection entry in the nova_api database 
says the same.

Remember that cells v2 is optional in newton and required in ocata. It'd 
be cool to prepare in newton while it's optional but just a heads up 
that unless you pick up that fix you need to pass the database 
connection URL in on the command line when running the map_cell0 command.

The various commands are also documented here:

https://docs.openstack.org/developer/nova/man/nova-manage.html#nova-cells-v2

Note that not all of these are in newton.

-- 

Thanks,

Matt



More information about the OpenStack-operators mailing list