"nova-manage db sync" is not creating tables

Asked by NarsingRao

Hi,

I have successfully installed keystone and glance (Folsom)
I have installed nova, and when executing the command "nova-manage db sync" it is displaying the following output

root@Controller:~# nova-manage db sync
2012-11-06 11:28:00 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.migration' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migration.pyc'> from (pid=8934) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658

==> /var/log/nova/nova-manage.log <==
2012-11-06 11:28:00 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.migration' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/migration.pyc'> from (pid=8934) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
root@Controller:~#

When checked the mysql database tables for nova, they havent created?
Before executing "nova-manage db sync" I have made sure that I have created the database nova in mysql database

Can you please let me know if i have missed anthing?

Thanks,
Narsing

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
NarsingRao (gurrapu-narsing) said :
#1

Following is the database information which I have mentioned in the nova.conf file (/etc/nova/nova.conf)

# DATABASE
sql_connection=mysql://nova:nova@192.168.206.130/nova

Thanks,
Narsing

Revision history for this message
Dimitri Racordon (dimitri-racordon) said :
#2

I have the same issue.

As far I investigated on, I noticed 'that nova-manage db sync' creates the database within the default sqlite file (/var/lib/nova/nova.sqlite) even if the flag sql_connection points to a mysql server.

Dimitri

Revision history for this message
NarsingRao (gurrapu-narsing) said :
#3

Thanks Dimitri for the providing some pointers on my queries

I did the following

1. Dropped and re-created the nova database in mysql servers
2. Deleted /var/lib/nova/nova.sqlite file

and then executed 'nova-manage db sync' cmd, but resulted in same issues :(

Revision history for this message
Dimitri Racordon (dimitri-racordon) said :
#4

You welcome.

I figured out my issue was related to a mistake in the configuration file nova.conf.

The configuration file I used was copied from the documentation appendix. Around line 13, the line "[keystone_authtoken]" seems to cause all the other flags to be unavailable to nova. I commented it and was then able to synchronize the correct database (MySQL). I do not know if that line "[keystone_authtoken]", which is a section header in INI syntax, is required by nova to authenticate itself to keystone, but at least so far, that fixed my issue with the database.

Maybe should the documentation example fixed about that?

Hope this helps,
Dimitri

Revision history for this message
Larry Matter (lmatter) said :
#6

I was following this guide: https://help.ubuntu.com/12.10/serverguide/ubuntucloud.html and had this same problem (debug message from db sync and no tables in the nova database in mysql).

If you notice this guide tells you to append to nova.conf a bunch of lines starting with "--". Long story short, if you remove the "--" for each line in the file then the db sync will work (I restarted all the nova services just to be safe, not sure if that is strictly required).

For example, you should see:
# Nova config FlatDHCPManager
sql_connection=mysql://novauser:novapassword@localhost/nova

Can you help with this problem?

Provide an answer of your own, or ask NarsingRao for more information if necessary.

To post a message you must log in.