[Keystone-manage] please give a nicer failure message

Bug #939523 reported by Alexey Eromenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Expired
Undecided
Unassigned

Bug Description

Executing keystone-manage with normal user privileges fails.

My understanding is that this is due to security features.
At any rate - it should give a readable error message.

Trying to setup dashboard, according to:
http://wiki.openstack.org/OpenStackDashboard

myuser@nova-server1:~$ keystone-manage token add 999888777666 admin
admin 2015-02-05T00:00
WARNING:root:Database (sqlite:////var/lib/keystone/keystone.db) is not
version controlled; run `keystone-manage sync_database` or override
your migrate version manually (see docs)
ERROR: (OperationalError) unable to open database file None None
ERROR:keystone.manage:(OperationalError) unable to open database file None None
Traceback (most recent call last):
 File "/usr/bin/keystone-manage", line 24, in <module>
   keystone.manage.main()
 File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py",
line 483, in main
   process(*parse_args(args))
 File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py",
line 106, in parse_args
   db.configure_backends()
 File "/usr/lib/python2.7/dist-packages/keystone/backends/__init__.py",
line 53, in configure_backends
   backend_module.configure_backend(backend_conf)
 File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/__init__.py",
line 158, in configure_backend
   _DRIVER = Driver(conf)
 File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/__init__.py",
line 53, in __init__
   self._init_engine(model_list)
 File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/__init__.py",
line 77, in _init_engine
   self._init_tables(model_list)
 File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/__init__.py",
line 129, in _init_tables
   checkfirst=True)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line
2535, in create_all
   tables=tables)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 2230, in _run_visitor
   conn = self.contextual_connect(close_with_result=False)
 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
758, in _do_get
   return 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)
sqlalchemy.exc.OperationalError: (OperationalError) unable to open
database file None None

===============
*** Database config
===============
myuser@nova-server1:~$ cat /etc/keystone/keystone.conf | grep -i sql
# Default: 'sqlite'
# Available choices are 'sqlite' [future will include LDAP, PAM, etc]
default_store = sqlite
backends = keystone.backends.sqlalchemy
[keystone.backends.sqlalchemy]
# SQLAlchemy connection string for the reference implementation registry
# server. Any valid SQLAlchemy connection string is fine.
sql_connection = sqlite:////var/lib/keystone/keystone.db
# Period in seconds after which SQLAlchemy should reestablish its connection
sql_idle_timeout = 30

File Check:

myuser@nova-server1:~$ ls /var/lib/keystone/keystone.db
ls: cannot access /var/lib/keystone/keystone.db: Permission denied

root@nova-server1:~# ls -la /var/lib/keystone/keystone.db
-rw-r--r-- 1 root root 28672 Feb 21 03:44 /var/lib/keystone/keystone.db

I am using Debian GNU/Linux 7.0 / testing.

Related to Debian Bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660891

--
-Alexey Eromenko "Technologov"

Revision history for this message
Joseph Heck (heckj) wrote :

alexy,

this bug is based on code that's been dramatically replaced, and seems to be more related to packaging than the project itself. Could you check with the latest packages, or relate how you installed it to help identify this bug?

Changed in keystone:
status: New → Incomplete
Revision history for this message
Alexey Eromenko (al4321) wrote : Re: [Bug 939523] Re: [Keystone-manage] please give a nicer failure message

Those are Debian packages of the latest essex milestone.

keystone-2012.1~e3-4

Should I try a newer snapshot ?
--
-Alexey Eromenko "Technologov"

Revision history for this message
Joseph Heck (heckj) wrote :

It's changed dramatically since that milestone. The essex-4 milestone will be out in a week or so, or you can test against trunk if you have access to those packages.

Revision history for this message
Dolph Mathews (dolph) wrote :

alexey - the essex4 milestone has been released and should be available; can you still reproduce this?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Keystone because there has been no activity for 60 days.]

Changed in keystone:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.