Ask Your Question

Is it possible to use PostgreSQL with Keystone? [closed]

asked 2012-04-10 22:49:50 -0600

breynolds gravatar image

I am in the process of installing Essex Nova/Glance/Keystone/Dashboard on Ubuntu 12.04 in a lab environment. I have previously had Diablo running with Nova and Glance using PostgreSQL.

When I install Keystone and create a PostgreSQL "keystone" database, user, etc. similar to how I do it for Nova/Glance, Keystone won't automatically create its tables upon restart and if I try to use keystone-manage db_sync it fails.

My connection string in Keystone.conf conforms to similar ones that I use with Nova/Glance successfully.

Is it even possible to use PostgreSQL with Keystone, and if so, can anyone provide some guidance on how they did it?

Thanks in advance.

Bill Reynolds

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-07-13 00:32:29.980900

6 answers

Sort by ยป oldest newest most voted

answered 2012-04-26 13:48:17 -0600

breynolds gravatar image

Is anyone using PostgreSQL with Keystone?

edit flag offensive delete link more

answered 2012-04-26 09:16:00 -0600

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

edit flag offensive delete link more

answered 2012-05-08 20:31:23 -0600

breynolds gravatar image

Really? No one?

edit flag offensive delete link more

answered 2012-05-10 13:42:01 -0600

Should be possible via a sqlalchemy backend. ( ( (

edit flag offensive delete link more

answered 2012-06-16 15:13:34 -0600

breynolds gravatar image

As of Keystone 2012.1 Keystone mostly works with PostgreSQL. PostgreSQL hasn't been tested very thoroughly with Keystone and a number of issues were preventing it from working at all prior to the Essex release: ( (

Users and tenants are still not removed properly through 'keystone user-delete' due to referntial integrity issues. You can work around it by going directly into the PostgreSQL tables and removing things manually.

Basic things you need to know:

sudo su - postgres psql CREATE USER keystonedbadmin; ALTER USER keystonedbadmin WITH PASSWORD '**'; CREATE DATABASE keystone; GRANT ALL PRIVILEGES ON DATABASE keystone TO keystonedbadmin; \q exit



edit flag offensive delete link more

answered 2014-07-11 04:58:18 -0600

DeepVish gravatar image

updated 2014-07-11 04:59:15 -0600

Yes, it is possible to use keystone with postgres, You can setup postgres database for keystone using following steps.

yum install postgresql
yum install postgresql-server
yum install python-sqlalchemy python-psycopg2

sudo su - postgres

postgres> psql
postgres=# CREATE USER keystone;
postgres=# ALTER USER keystone WITH PASSWORD 'Passw0rd';
postgres=# CREATE DATABASE keystone;
postgres=# GRANT ALL PRIVILEGES ON DATABASE keystone TO keystone;
postgres=# \q
postgres> exit


connection = postgresql://keystone:Passw0rd@

Hope this is useful

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-04-10 22:49:50 -0600

Seen: 3,215 times

Last updated: Jul 11 '14