Bug 1025872
Summary: | openstack-db --init --service keystone --password somepass fails with CRITICAL error - access denied | ||
---|---|---|---|
Product: | [Community] RDO | Reporter: | Edward Walter <ewalter> |
Component: | openstack-utils | Assignee: | Pádraig Brady <pbrady> |
Status: | CLOSED WORKSFORME | QA Contact: | Ami Jeain <ajeain> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | b24warbaby, lars, mfuruta, pbrady, sdpagent, yeylon |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-18 20:51:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Edward Walter
2013-11-01 19:18:45 UTC
It looks like this is a problem in keystone-manage. I did the following: [root@buena-stack Desktop]# mysql -e "create database keystone;" [root@buena-stack Desktop]# mysql -e "create user 'keystone'@'localhost' identified by 'mykeystonepassword';" [root@buena-stack Desktop]# mysql -e "create user 'keystone'@'%' identified by 'mykeystonepassword';" [root@buena-stack Desktop]# mysql -e "grant all on keystone.* to 'keystone'@'localhost';" [root@buena-stack Desktop]# mysql -e "grant all on keystone.* to 'keystone'@'%';" [root@buena-stack Desktop]# mysql -e "flush privileges;" [root@buena-stack ~]# runuser -s /bin/sh keystone -c "keystone-manage db_sync" 2013-11-01 16:03:47.404 15316 CRITICAL keystone [-] (OperationalError) (1045, "Access denied for user 'keystone'@'localhost' (using password: YES)") None None [root@buena-stack ~]# rpm -qf `which keystone-manage` openstack-keystone-2013.2-1.el6.noarch What does the "mykeystonepassword" mean ? I am stuck with the same issue ; [root@ab763 ~]# /usr/bin/openstack-db --drop --service keystone Please enter the password for the 'root' MySQL user: Verified connectivity to MySQL. Dropping 'keystone' database. Complete! [root@ab763 ~]# openstack-db --init --service keystone --password password Please enter the password for the 'root' MySQL user: Verified connectivity to MySQL. Creating 'keystone' database. Updating 'keystone' database password in /etc/keystone/keystone.conf Initializing the keystone database, please wait... Traceback (most recent call last): File "/usr/bin/keystone-manage", line 51, in <module> cli.main(argv=sys.argv, config_files=config_files) File "/opt/stack/keystone/keystone/cli.py", line 189, in main default_config_files=config_files) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1659, in __call__ raise ConfigFilesNotFoundError(self._namespace._files_not_found) oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: /etc/keystone/keystone.conf ERROR 1146 (42S02) at line 1: Table 'keystone.migrate_version' doesn't exist Final sanity check failed. Please file a bug report on bugzilla.redhat.com against the openstack-keystone package. [root@ab763 ~]# I copied the manual steps to a script: root@ab763 ~]# cat fix1.sh mysql -e "create database keystone;" mysql -e "create user 'keystone'@'localhost' identified by 'mypasswd';" mysql -e "create user 'keystone'@'%' identified by 'mypasswd';" mysql -e "grant all on keystone.* to 'keystone'@'localhost';" mysql -e "grant all on keystone.* to 'keystone'@'%';" mysql -e "flush privileges;" runuser -s /bin/sh keystone -c "keystone-manage db_sync" yeilds: [root@ab763 ~]# ./fix1.sh ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Traceback (most recent call last): File "/usr/bin/keystone-manage", line 51, in <module> cli.main(argv=sys.argv, config_files=config_files) File "/opt/stack/keystone/keystone/cli.py", line 189, in main default_config_files=config_files) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1659, in __call__ raise ConfigFilesNotFoundError(self._namespace._files_not_found) oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: /etc/keystone/keystone.conf [root@ab763 ~]# [root@ab763 ~]# rpm -qf `which keystone-manage` openstack-keystone-2014.1.1-1.el6.noarch [root@ab763 ~]# This could be a permissions issue. I.E. /etc/keystone/keystone.conf is not accessible to the keystone user? Can you give the output from: namei -l /etc/keystone/keystone.conf Was keystone installed ever, outside of rpm package management on this system? I am not able to reproduce this issue with current packages (RDO Juno). Given the age of the original request I am closing this issue. |