python-psycopg2 is not installed when using PostgreSQL

Bug #1218291 reported by Akihiro Motoki
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

When PostgreSQL is enabled, sqlalchemy requires psycopg2, but devstack does not install it automatically.
This results in a failure of stack.sh. (The detail is shown below)

It is better to install psycopg2 python module when installing postgresql package.

-----

logs/screen-key.2013-08-29-185453.log

(keystone.common.wsgi): 2013-08-29 18:55:51,010 DEBUG wsgi __call__ arg_dict: {}
(keystone.common.wsgi): 2013-08-29 18:55:51,011 ERROR wsgi __call__ No module named psycopg2
Traceback (most recent call last):
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 238, in __call__
    result = method(context, **params)
  File "/opt/stack/keystone/keystone/catalog/controllers.py", line 50, in create_service
    service_id, service_ref)
  File "/opt/stack/keystone/keystone/common/manager.py", line 44, in _wrapper
    return f(*args, **kw)
  File "/opt/stack/keystone/keystone/catalog/backends/sql.py", line 82, in create_service
    session = self.get_session()
  File "/opt/stack/keystone/keystone/common/sql/core.py", line 252, in get_session
    self._engine = self.get_engine()
  File "/opt/stack/keystone/keystone/common/sql/core.py", line 291, in get_engine
    engine = new_engine()
  File "/opt/stack/keystone/keystone/common/sql/core.py", line 278, in new_engine
    engine = sql.create_engine(CONF.sql.connection, **engine_config)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 338, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 64, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 312, in dbapi
    psycopg = __import__('psycopg2')
ImportError: No module named psycopg2

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Sorry this is my mistake.

Changed in devstack:
status: New → Invalid
yalei wang (yalei-wang)
Changed in devstack:
status: Invalid → Confirmed
Revision history for this message
yalei wang (yalei-wang) wrote :

got a same problem, and should we add the dependency for psycopg2

Revision history for this message
Mahito OGURA (earthdragon77) wrote :

I tried to install devstack with postgresql, however I couldn't get a same problem.
Maybe this ploblem is fixed.

Changed in devstack:
status: Confirmed → Invalid
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.