Bug 1128199 - the command for grant access to the neutron_ml2 database is error.
Summary: the command for grant access to the neutron_ml2 database is error.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: doc-Installation_and_Configuration_Guide
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 5.0 (RHEL 7)
Assignee: Martin Lopes
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-08 14:38 UTC by lidong chen
Modified: 2015-10-21 23:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-24 04:58:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lidong chen 2014-08-08 14:38:59 UTC
Description of problem:


Version-Release number of selected component (if applicable):
osp5 on rhel7

How reproducible:

the command for grant access to the neutron_ml2 database is error.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/5/html-single/Installation_and_Configuration_Guide/index.html#Creating_the_Database

the command describe in documentation.but it is error.
mysql -u root -p
CREATE DATABASE neutron_ml2 character set utf8;
GRANT ALL ON neutron_ml2.* TO 'neutron'@'%';
FLUSH PRIVILEGES;
quit

it should be like this.

mysql -u root -p
CREATE DATABASE neutron_ml2 character set utf8;
GRANT ALL ON neutron_ml2.* TO 'neutron'@'%' IDENTIFIED BY 'PASSWORD';
GRANT ALL ON neutron_ml2.* TO 'neutron'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
quit


Steps to Reproduce:
1.
2.
3.

Actual results:

when i run neutron-db-manage command, it fail like below.
It is caused by the wrong command mentioned.

[root@control ~]# 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
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.7/site-packages/neutron/db/migration/cli.py", line 169, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 82, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 60, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 124, in upgrade
    script.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 191, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/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.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 103, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 78, in run_migrations_online
    connection = engine.connect()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1641, in connect
    return self._connection_cls(self, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 59, in __init__
    self.__connection = connection or engine.raw_connection()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1699, in raw_connection
    return self.pool.unique_connection()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 220, in unique_connection
    return _ConnectionFairy(self).checkout()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 431, in __init__
    rec = self._connection_record = pool._do_get()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 871, in _do_get
    return self._create_connection()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 225, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 318, in __init__
    self.connection = self.__connect()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 379, in __connect
    connection = self.__pool._creator()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 80, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 283, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied for user 'neutron'@'localhost' (using password: YES)") None None


Expected results:


Additional info:

Comment 2 Don Domingo 2014-08-11 01:55:26 UTC
Reassigning to Martin, who is in charge of all Neutron content.

Comment 7 Martin Lopes 2015-04-24 04:58:16 UTC
Fix was added successfully. Closing bug.


Note You need to log in before you can comment on or make changes to this bug.