← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1109130] Re: keystone-manage db_sync giving error

 

Marking as wont-fix since this is a mysql permissions issue; if this
hasn't been resolved, I'd suggest pinging the mailing list.

** Changed in: keystone
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1109130

Title:
  keystone-manage db_sync giving error

Status in OpenStack Identity (Keystone):
  Won't Fix

Bug description:
  =======================================================================
  Output of "keystone-manage db_sync":

  Traceback (most recent call last):
    File "/usr/bin/keystone-manage", line 28, in <module>
      cli.main(argv=sys.argv, config_files=config_files)
    File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 148, in main
      return run(cmd, (args[:1] + args[2:]))
    File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 134, in run
      return CMDS[cmd](argv=args).run()
    File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 36, in run
      return self.main()
    File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 57, in main
      driver.db_sync()
    File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 135, in db_sync
      migration.db_sync()
    File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 50, in db_sync
      current_version = db_version()
    File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 66, in db_version
      return db_version_control(0)
    File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 72, in db_version_control
      CONF.sql.connection, repo_path, version)
    File "<string>", line 2, in version_control
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
      return f(*a, **kw)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 250, in version_control
      ControlledSchema.create(engine, repository, version)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 139, in create
      table = cls._create_table_version(engine, repository, version)
    File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 180, in _create_table_version
      if not table.exists():
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 549, in exists
      self.name, schema=self.schema)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2274, in run_callable
      conn = self.contextual_connect()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2340, in contextual_connect
      self.pool.connect(), 
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 210, in connect
      return _ConnectionFairy(self).checkout()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 371, in __init__
      rec = self._connection_record = pool._do_get()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 697, in _do_get
      con = self._create_connection()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 174, in _create_connection
      return _ConnectionRecord(self)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 256, in __init__
      self.connection = self.__connect()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 316, in __connect
      connection = self.__pool._creator()
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect
      return dialect.connect(*cargs, **cparams)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 280, in connect
      return self.dbapi.connect(*cargs, **cparams)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
      return Connection(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
      super(Connection, self).__init__(*args, **kwargs2)
  sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied for user 'keystonedbadmin'@'10.0.2.15' (using password: YES)") None None
  =======================================================================
  Content of keystone.conf:
  -----------------------------------------

  [DEFAULT]
  #bind_host = 0.0.0.0
  public_port = 5000
  admin_port = 35357
  #admin_token = ADMIN
  admin_token = admin
  compute_port = 8774
  verbose = True
  debug = True
  log_config = /etc/keystone/logging.conf

  # ================= Syslog Options ============================
  # Send logs to syslog (/dev/log) instead of to file specified
  # by `log-file`
  use_syslog = False

  # Facility to use. If unset defaults to LOG_USER.
  # syslog_log_facility = LOG_LOCAL0

  [sql]
  #connection = sqlite:////var/lib/keystone/keystone.db
  connection = mysql://keystonedbadmin:password@10.0.2.15/keystone.db
  idle_timeout = 200

  [ldap]
  #url = ldap://localhost
  #tree_dn = dc=example,dc=com
  #user_tree_dn = ou=Users,dc=example,dc=com
  #role_tree_dn = ou=Roles,dc=example,dc=com
  #tenant_tree_dn = ou=Groups,dc=example,dc=com
  #user = dc=Manager,dc=example,dc=com
  #password = freeipa4all
  #suffix = cn=example,cn=com

  [identity]
  driver = keystone.identity.backends.sql.Identity

  [catalog]
  driver = keystone.catalog.backends.sql.Catalog

  [token]
  driver = keystone.token.backends.sql.Token

  # Amount of time a token should remain valid (in seconds)
  expiration = 86400

  [policy]
  driver = keystone.policy.backends.rules.Policy

  [ec2]
  driver = keystone.contrib.ec2.backends.sql.Ec2

  [filter:debug]
  paste.filter_factory = keystone.common.wsgi:Debug.factory

  [filter:token_auth]
  paste.filter_factory = keystone.middleware:TokenAuthMiddleware.factory

  [filter:admin_token_auth]
  paste.filter_factory = keystone.middleware:AdminTokenAuthMiddleware.factory

  [filter:xml_body]
  paste.filter_factory = keystone.middleware:XmlBodyMiddleware.factory

  [filter:json_body]
  paste.filter_factory = keystone.middleware:JsonBodyMiddleware.factory

  [filter:crud_extension]
  paste.filter_factory = keystone.contrib.admin_crud:CrudExtension.factory

  [filter:ec2_extension]
  paste.filter_factory = keystone.contrib.ec2:Ec2Extension.factory

  [app:public_service]
  paste.app_factory = keystone.service:public_app_factory

  [app:admin_service]
  paste.app_factory = keystone.service:admin_app_factory

  [pipeline:public_api]
  pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension public_service

  [pipeline:admin_api]
  pipeline = token_auth admin_token_auth xml_body json_body debug ec2_extension crud_extension admin_se
  rvice

  [app:public_version_service]
  paste.app_factory = keystone.service:public_version_app_factory

  [app:admin_version_service]
  paste.app_factory = keystone.service:admin_version_app_factory

  [pipeline:public_version_api]
  pipeline = xml_body public_version_service

  [pipeline:admin_version_api]
  pipeline = xml_body admin_version_service

  [composite:main]
  use = egg:Paste#urlmap
  /v2.0 = public_api
  / = public_version_api

  [composite:admin]
  use = egg:Paste#urlmap
  /v2.0 = admin_api
  / = admin_version_api

  =======================================================================

  Database 'keystone' is created successfully and can see it through
  CLI. Also, user keystonedbadmin is granted all permissions:

  mysql> show grants for keystonedbadmin;
  +----------------------------------------------------------------------------------------------------------------+
  | Grants for keystonedbadmin@%                                                                                   |
  +----------------------------------------------------------------------------------------------------------------+
  | GRANT USAGE ON *.* TO 'keystonedbadmin'@'%' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
  | GRANT ALL PRIVILEGES ON `keystone`.* TO 'keystonedbadmin'@'%'                                                  |
  +----------------------------------------------------------------------------------------------------------------+
  2 rows in set (0.00 sec)

  =======================================================================

  Please let me know if you need any other info.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1109130/+subscriptions