Issue While Creating Neutron Database Schema [closed]

asked 2014-06-14 06:50:47 -0500

rahulrajvn gravatar image

updated 2014-06-14 08:35:28 -0500

SamYaple gravatar image

Hi ,

I am trying to Configure neutron as part of Openstack implementation and have got stuck at this point. As per the Docs we used to initialize the database's of different services like keystone , nova etc using openstack-db --init . But for neutron its not mentioned about any initializing.

http://docs.openstack.org/icehouse/in... .

I have tried following two commands to initialize the database but both

openstack-db --init --service neutron --password **********

and

neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head

Error Which I get >

No handlers could be found for logger "neutron.common.legacy"

Traceback (most recent call last):

  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 169, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 60, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/alembic/command.py", line 189, in current
    script.run_env()
  File "/usr/lib/python2.6/site-packages/alembic/script.py", line 191, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.6/site-packages/alembic/util.py", line 186, in load_python_file
    module = imp.load_source(module_id, path, open(path, 'rb'))
  File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 42, in <module>
    importutils.import_class(class_path)
  File "/usr/lib/python2.6/site-packages/neutron/openstack/common/importutils.py", line 33, in import_class
    traceback.format_exception(*sys.exc_info())))
ImportError: Class ml2 cannot be found (['Traceback (most recent call last):\n', '  File "/usr/lib/python2.6/site-packages/neutron/openstack/common/importutils.py", line 28, in import_class\n    __import__(mod_str)\n', 'ValueError: Empty module name\n'])
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by rahulrajvn
close date 2014-06-18 04:42:20.581402

Comments

What is value of service_plugins in neutron.conf when you run neutron-db-manage ?

dbaxps gravatar imagedbaxps ( 2014-06-14 07:10:15 -0500 )edit
dbaxps gravatar imagedbaxps ( 2014-06-14 07:35:19 -0500 )edit

Thank you for the update. I have checked those urls..One of my doubt is..Should we initialize the neutron database after creating it.

rahulrajvn gravatar imagerahulrajvn ( 2014-06-14 09:09:54 -0500 )edit
1

I've just done Multi Node IceHouse Neutron ML2&OVS&GRE Setup via packstack:-

[root@icehouse1 ~(keystone_admin)]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1010
Server version: 5.5.36-MariaDB-wsrep MariaDB Server, wsrep_25.9.r3961

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cinder             |
| glance             |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| performance_schema |
| test               |
+--------------------+
9 rows in set (0.00 sec)

MariaDB [(none)]> 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
MariaDB [neutron]> show tables ;
+------------------------------+
| Tables_in_neutron            |
+------------------------------+
| agents                       |
| alembic_version              |
| allowedaddresspairs          |
| arista_provisioned_nets      |
| arista_provisioned_tenants   |
| arista_provisioned_vms       |
| cisco_ml2_credentials        |
| cisco_ml2_nexusport_bindings |
| consistencyhashes            |
| dnsnameservers               |
| externalnetworks             |
| extradhcpopts                |
| floatingips                  |
| ipallocationpools            |
| ipallocations                |
| ipavailabilityranges         |
| ml2_brocadenetworks          |
| ml2_brocadeports             |
| ml2_flat_allocations         |
| ml2_gre_allocations          |
| ml2_gre_endpoints            |
| ml2_network_segments ...
(more)
dbaxps gravatar imagedbaxps ( 2014-06-14 09:20:38 -0500 )edit

I am not Using Packstack. So I think I need to initialize the database manually. I have tried it with it with openstack-db and neutron-db-manage , both are giving same error which I have mentioned above.

rahulrajvn gravatar imagerahulrajvn ( 2014-06-14 09:44:50 -0500 )edit