Revision history [back]

click to hide/show revision 1
initial version

Still cannot find the issue:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| keystone           |
| mysql              |
| performance_schema |
| test               |

MariaDB [(none)]> use keystone;
Database changed
MariaDB [keystone]> show tables;
Empty set (0.00 sec)

I have run: su -s /bin/sh -c "keystone-manage db_sync" keystone one more time. Still keystone db is empty.

[root@controller ~]# openstack service create --debug --name keystone --description "OpenStack Identity" identity
START with options: ['service', 'create', '--debug', '--name', 'keystone', '--description', 'OpenStack Identity', 'identity']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='', cacert='', client_id='', client_secret='', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', password='', project_domain_id='', project_domain_name='', project_id='', project_name='', protocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='58c1160ad3c5a88b306a', trust_id='', url='http://controller:35357/v3', user_domain_id='', user_domain_name='', user_id='', username='', verbose_level=3, verify=None)
defaults: {'auth_type': 'token_endpoint', 'compute_api_version': '2', 'key': None, 'database_api_version': '1.0', 'api_timeout': None, 'baremetal_api_version': '1', 'cacert': None, 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'orchestration_api_version': '1', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'token_endpoint', 'compute_api_version': '2', 'orchestration_api_version': '1', 'database_api_version': '1.0', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_api_version': '1', 'auth': {'url': 'http://controller:35357/v3', 'token': '58c1160ad3c5a88b306a'}, 'default_domain': 'default', 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'cacert': None, 'deferred_help': False, 'identity_api_version': '3', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 1, cmd group openstack.volume.v1
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
command: service create -> openstackclient.identity.v3.service.CreateService
Auth plugin token_endpoint selected
auth_type: token_endpoint
Using auth plugin: token_endpoint
Using parameters {'url': 'http://controller:35357/v3', 'token': '58c1160ad3c5a88b306a'}
Get auth_ref
take_action(Namespace(columns=[], description='OpenStack Identity', disable=False, enable=False, formatter='table', max_width=0, name='keystone', noindent=False, prefix='', type='identity', variables=[]))
Instantiating identity client: <class 'keystoneclient.v3.client.Client'>
REQ: curl -g -i -X POST http://controller:35357/v3/services -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}b9bf18d204ae9fea2faaf3c8209dba893d1313d1" -d '{"service": {"enabled": true, "type": "identity", "description": "OpenStack Identity", "name": "keystone"}}'
Starting new HTTP connection (1): controller
"POST /v3/services HTTP/1.1" 401 114
RESP: [401] content-length: 114 vary: X-Auth-Token keep-alive: timeout=5, max=100 server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 connection: Keep-Alive date: Thu, 18 Feb 2016 16:34:45 GMT www-authenticate: Keystone uri="http://controller:35357" content-type: application/json x-openstack-request-id: req-e7918206-3683-4c22-8806-63ad4bcc18ce 
RESP BODY: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

Request returned failure status: 401
The request you have made requires authentication. (HTTP 401) (Request-ID: req-e7918206-3683-4c22-8806-63ad4bcc18ce)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/common/utils.py", line 45, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstackclient/identity/v3/service.py", line 76, in take_action
enabled=enabled,
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v3/services.py", line 47, in create
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 75, in func
    return f(*args, **new_kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 344, in create
    self.key)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 162, in _create
    return self._post(url, body, response_key, return_raw, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 176, in _post
    resp, body = self.client.post(url, body=body, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 176, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 206, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 95, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstackclient/common/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 401, in request
    raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e7918206-3683-4c22-8806-63ad4bcc18ce)
clean_up CreateService: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e7918206-3683-4c22-8806-63ad4bcc18ce)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 112, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 255, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 92, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/common/utils.py", line 45, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstackclient/identity/v3/service.py", line 76, in take_action
    enabled=enabled,
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v3/services.py", line 47, in create
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 75, in func
    return f(*args, **new_kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 344, in create
    self.key)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 162, in _create
    return self._post(url, body, response_key, return_raw, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 176, in _post
    resp, body = self.client.post(url, body=body, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 176, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 206, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 95, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstackclient/common/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 401, in request
    raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e7918206-3683-4c22-8806-63ad4bcc18ce)

END return value: 1

Here is snippet from /var/log/keystone/keystone.log

2016-02-18 11:30:37.593 9260 CRITICAL keystone [-] OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'keystone'@'controller' (using password: YES)")
2016-02-18 11:30:37.593 9260 ERROR keystone Traceback (most recent call last):
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/bin/keystone-manage", line 10, in <module>
2016-02-18 11:30:37.593 9260 ERROR keystone     sys.exit(main())
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/manage.py", line 46, in main
2016-02-18 11:30:37.593 9260 ERROR keystone     cli.main(argv=sys.argv, config_files=config_files)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 685, in main
2016-02-18 11:30:37.593 9260 ERROR keystone     CONF.command.cmd_class.main()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 77, in main
2016-02-18 11:30:37.593 9260 ERROR keystone     migration_helpers.sync_database_to_version(extension, version)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/common/sql/migration_helpers.py", line 194, in sync_database_to_version
2016-02-18 11:30:37.593 9260 ERROR keystone     _sync_common_repo(version)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/common/sql/migration_helpers.py", line 145, in _sync_common_repo
2016-02-18 11:30:37.593 9260 ERROR keystone     engine = sql.get_engine()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/common/sql/core.py", line 188, in get_engine
2016-02-18 11:30:37.593 9260 ERROR keystone     return _get_engine_facade().get_engine()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/common/sql/core.py", line 176, in _get_engine_facade
2016-02-18 11:30:37.593 9260 ERROR keystone     _engine_facade = db_session.EngineFacade.from_config(CONF)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1015, in from_config
2016-02-18 11:30:37.593 9260 ERROR keystone     expire_on_commit=expire_on_commit, _conf=conf)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 943, in __init__
2016-02-18 11:30:37.593 9260 ERROR keystone     slave_connection=slave_connection)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 338, in _start
2016-02-18 11:30:37.593 9260 ERROR keystone     engine_args, maker_args)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 362, in _setup_for_connection
2016-02-18 11:30:37.593 9260 ERROR keystone     sql_connection=sql_connection, **engine_kwargs)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 152, in create_engine
2016-02-18 11:30:37.593 9260 ERROR keystone     test_conn = _test_connection(engine, max_retries, retry_interval)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 326, in _test_connection
2016-02-18 11:30:37.593 9260 ERROR keystone     return engine.connect()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2018, in connect
2016-02-18 11:30:37.593 9260 ERROR keystone     return self._connection_cls(self, **kwargs)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 72, in __init__
2016-02-18 11:30:37.593 9260 ERROR keystone     if connection is not None else engine.raw_connection()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2104, in raw_connection
2016-02-18 11:30:37.593 9260 ERROR keystone     self.pool.unique_connection, _connection)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
2016-02-18 11:30:37.593 9260 ERROR keystone     e, dialect, self)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1401, in _handle_dbapi_exception_noconnection
2016-02-18 11:30:37.593 9260 ERROR keystone     util.raise_from_cause(newraise, exc_info)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2016-02-18 11:30:37.593 9260 ERROR keystone     reraise(type(exception), exception, tb=exc_tb)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
2016-02-18 11:30:37.593 9260 ERROR keystone     return fn()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 318, in unique_connection
2016-02-18 11:30:37.593 9260 ERROR keystone     return _ConnectionFairy._checkout(self)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 713, in _checkout
2016-02-18 11:30:37.593 9260 ERROR keystone     fairy = _ConnectionRecord.checkout(pool)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 480, in checkout
2016-02-18 11:30:37.593 9260 ERROR keystone     rec = pool._do_get()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1060, in _do_get
2016-02-18 11:30:37.593 9260 ERROR keystone     self._dec_overflow()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
2016-02-18 11:30:37.593 9260 ERROR keystone     compat.reraise(exc_type, exc_value, exc_tb)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1057, in _do_get
2016-02-18 11:30:37.593 9260 ERROR keystone     return self._create_connection()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 323, in _create_connection
2016-02-18 11:30:37.593 9260 ERROR keystone     return _ConnectionRecord(self)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 449, in __init__
2016-02-18 11:30:37.593 9260 ERROR keystone     self.connection = self.__connect()
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 607, in __connect
2016-02-18 11:30:37.593 9260 ERROR keystone     connection = self.__pool._invoke_creator(self)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 97, in connect
2016-02-18 11:30:37.593 9260 ERROR keystone     return dialect.connect(*cargs, **cparams)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 385, in connect
2016-02-18 11:30:37.593 9260 ERROR keystone     return self.dbapi.connect(*cargs, **cparams)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
2016-02-18 11:30:37.593 9260 ERROR keystone     return Connection(*args, **kwargs)
2016-02-18 11:30:37.593 9260 ERROR keystone   File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187, in __init__
2016-02-18 11:30:37.593 9260 ERROR keystone     super(Connection, self).__init__(*args, **kwargs2)
2016-02-18 11:30:37.593 9260 ERROR keystone OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'keystone'@'controller' (using password: YES)")
2016-02-18 11:30:37.593 9260 ERROR keystone 
2016-02-18 11:34:45.848 2911 WARNING keystone.middleware.core [req-e7918206-3683-4c22-8806-63ad4bcc18ce - - - - -] RBAC: Invalid token
2016-02-18 11:34:45.849 2911 WARNING keystone.common.wsgi [req-e7918206-3683-4c22-8806-63ad4bcc18ce - - - - -] The request you have made requires authentication.
2016-02-18 11:38:46.162 2909 WARNING keystone.middleware.core [req-32ccab5e-59f9-409d-8122-92932d5d2858 - - - - -] RBAC: Invalid token
2016-02-18 11:38:46.163 2909 WARNING keystone.common.wsgi [req-32ccab5e-59f9-409d-8122-92932d5d2858 - - - - -] The request you have made requires authentication.
2016-02-18 11:41:44.014 2913 WARNING keystone.middleware.core [req-8dc83146-2456-42d3-ab1f-95bf8bebfe51 - - - - -] RBAC: Invalid token
2016-02-18 11:41:44.015 2913 WARNING keystone.common.wsgi [req-8dc83146-2456-42d3-ab1f-95bf8bebfe51 - - - - -] The request you have made requires authentication

I can login to MariaDB:

mysql -u keystone -p PASSWORD (password setup in /etc/keystone/keystone.conf)
connection = mysql://keystone:PASSWORD@controller/keystone

How can I populate the keystone db, how to fix current issue ?