Ask Your Question
0

Database table does not exists error

asked 2015-01-22 05:56:24 -0500

ettorezugliani gravatar image

We are implementing the precommit part of a mechanism driver (ml2) right now we are having problems with sqlalchemy. we made the class that uses the tables, but when the precommit is called an error pops up telling that the tables dont exists. To create the tables should we use a create all on initialize? or is there a proper way of doing it?

edit retag flag offensive close merge delete

Comments

What about creating tables using below command in openstack JUNO.

su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutron
Ranjit gravatar imageRanjit ( 2015-01-22 08:08:20 -0500 )edit

Thank you! We managed to do it with your help, we also found this helpful page in the mailing list. https://wiki.openstack.org/wiki/Neutr...

ettorezugliani gravatar imageettorezugliani ( 2015-01-22 11:40:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-22 11:54:19 -0500

ettorezugliani gravatar image

We managed to do it thanks to Ranjit's comment and to the mailing list (openstack-dev).

Here goes what we did.

First we ran the command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini revision -m "Description" --autogenerate

The file's path was: /usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/versions/ And the file's name was <id>_description.py

In order to match our desired database with some existing/functional one (like arista, or brocade), we modified our file following the other files pattern in the folder.

Last, we ran the command: neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head

That validates our changes.

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: 2015-01-22 05:56:24 -0500

Seen: 88 times

Last updated: Jan 22 '15