Ask Your Question
1

IceHouse - neutron didn't create db tables

asked 2014-11-02 03:51:04 -0600

azriel gravatar image

updated 2014-11-02 05:12:06 -0600

Hi,

I'm doing a manual installaiton on Ubuntu 14.10 and for some reason Neutron didn't create the db tables. i'm getting an error on the server.log saying -

ProgrammingError: (ProgrammingError) (1146, "Table 'neutron.ml2_gre_allocations' doesn't exist") 'SELECT ml2_gre_allocations.gre_id AS ml2_gre_allocations_gre_id, ml2_gre_allocations.allocated AS ml2_gre_allocations_allocated \nFROM ml2_gre_allocations' ()

netstat -ntlp

root@icehouse:~# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:6080            0.0.0.0:*               LISTEN      1873/python     
tcp        0      0 0.0.0.0:8773            0.0.0.0:*               LISTEN      1861/python     
tcp        0      0 0.0.0.0:8774            0.0.0.0:*               LISTEN      1861/python     
tcp        0      0 0.0.0.0:8775            0.0.0.0:*               LISTEN      1861/python     
tcp        0      0 0.0.0.0:9191            0.0.0.0:*               LISTEN      1740/python     
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      2549/beam.smp   
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      1734/python     
tcp        0      0 10.210.154.101:3306     0.0.0.0:*               LISTEN      2142/mysqld     
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      28706/memcached 
tcp        0      0 0.0.0.0:9292            0.0.0.0:*               LISTEN      1749/python     
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      2935/dnsmasq    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1808/sshd       
tcp        0      0 0.0.0.0:35357           0.0.0.0:*               LISTEN      1734/python     
tcp6       0      0 :::5672                 :::*                    LISTEN      2549/beam.smp   
tcp6       0      0 :::80                   :::*                    LISTEN      28561/apache2   
tcp6       0      0 :::4369                 :::*                    LISTEN      2349/epmd       
tcp6       0      0 :::22                   :::*                    LISTEN      1808/sshd

mysql db -

mysql> use neutron;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------+
| Tables_in_neutron |
+-------------------+
| alembic_version   |
+-------------------+
1 row in set (0.00 sec)

neutron server.log

2014-11-02 11:08:24.334 32654 TRACE neutron 
2014-11-02 11:08:24.880 32664 INFO neutron.common.config [-] Logging enabled!
2014-11-02 11:08:24.891 32664 INFO neutron.common.config [-] Config paste file: /etc/neutron/api-paste.ini
2014-11-02 11:08:24.994 32664 INFO neutron.manager [-] Loading core plugin: ml2
2014-11-02 11:08:25.077 32664 INFO neutron.plugins.ml2.managers [-] Configured type driver names: ['gre']
2014-11-02 11:08:25.081 32664 INFO neutron.plugins.ml2.managers [-] Loaded type driver names: ['gre']
2014-11-02 11:08:25.082 32664 INFO neutron.plugins.ml2.managers [-] Registered types: ['gre']
2014-11-02 11:08:25.082 32664 INFO neutron.plugins.ml2.managers [-] Tenant network_types: ['gre']
2014-11-02 11:08:25.083 32664 INFO neutron.plugins.ml2.managers [-] Configured extension driver names: []
2014-11-02 11:08:25.083 32664 INFO neutron.plugins.ml2.managers [-] Loaded extension driver names: []
2014-11-02 11:08:25.084 32664 INFO neutron.plugins.ml2.managers [-] Registered extension drivers: []
2014-11-02 11 ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2014-11-03 00:06:27 -0600

james-page gravatar image

Ubuntu 14.10 ships with OpenStack Juno; for Juno, Neutron database migrations must be applied manually as there are for Nova and other projects:

sudo neutron-db-manage --config-file=/etc/neutron/neutron.conf upgrade head

should put the database table in place.

edit flag offensive delete link more
0

answered 2014-11-02 19:04:24 -0600

tahder gravatar image

Can you please try this if this gonna solve it, as it will recreate/update a database

mysql -e "drop database if exists neutron_ml2;"
mysql -e "create database neutron_ml2 character set utf8;"
mysql -e "grant all on neutron_ml2.* to 'neutron'@'%';"
neutron-db-manage --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head

Note: you can change neutron_ml2 --> to neutron as per your example, and note that passwords in neutron.conf and plugin.ini is the same. But it depends on your config plugin.ini sometimes don't have password.

Check also if plugin.ini is link to /etc/neutron/plugins/ml2/ml2_conf.ini as you're using ml2.

edit flag offensive delete link more
0

answered 2014-11-03 03:58:00 -0600

rahulrajvn gravatar image

Hi , In Ice house there is no command to create database for creating database, Rather the database is created when the service is restarted. So Make sure all your configuration are correct. and restart the service,

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-11-02 03:51:04 -0600

Seen: 1,989 times

Last updated: Nov 02 '14