Ask Your Question
2

liberty install neutron fails to populate the database

asked 2015-11-19 03:31:59 -0500

OpenCloudRocks gravatar image

Hello,

I am trying to install liberty in a lab with multiple dedicated machines (not VMs). I am following the installer for liberty step by step and I am stuck here: http://docs.openstack.org/liberty/install-guide-rdo/neutron-controller-install.html#neutron-controller-metadata-agent (http://docs.openstack.org/liberty/ins...)

Finalize installation Populate the database:

# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

When I run the command I get the following errors:

[root@controller ~]# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
>  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
No handlers could be found for logger "neutron.quota"
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 554, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 188, in do_upgrade
    run_sanity_checks(config, revision)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 541, in run_sanity_checks
    script_dir.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 397, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 135, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 114, in run_migrations_online
    engine = session.create_engine(neutron_config.database.connection)
  File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 112, in create_engine
    url = sqlalchemy.engine.url.make_url(sql_connection)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/url.py", line 176, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/url.py", line 225, in _parse_rfc1738_args
    "Could not parse rfc1738 URL from string '%s'" % name)
sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string ''
[root@controller ~]#

I'm stuck at this point because neutron will not start if this db does not get populated.

Any help is greatly appreciated!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-02-22 09:54:57 -0500

WigiPedia gravatar image

updated 2017-02-22 09:56:15 -0500

The last line in your error code would indicate that DNS is not resolving the hostname properly or that your /etc/hosts file does not contain an entry for the neutron database server. I have installed Newton and I ran into the same issue and adjusting the /etc/hosts file allowed for the proper resolution of the hostname.

<IP>     <hostname>

The other alternative is to specify the IP address of the database server in the [database] section of /etc/neutron/neutron.conf.

connection = mysql+pymysql://root:password@127.0.0.1/neutron

Generalized as the way @sean-perry-a put it.

edit flag offensive delete link more
0

answered 2015-11-19 18:59:45 -0500

sean-perry-a gravatar image

As we discussed on IRC the problem here is SQL Alchemy cannot talk to your database. You need to verify the database configuration in your neutron config. Mine looks like:

connection = mysql+pymysql://root:password@127.0.0.1/keystone?charset=utf8

basically:

<user>:<password>@hostname/<db name>
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-11-19 03:31:59 -0500

Seen: 1,226 times

Last updated: Feb 22 '17