During the configuration of the Keystone identity service on an Ubuntu 14.04.2 LTS host, I observed a missing dependency which is not documented within the generic OpenStack Kilo documentation.
I attempted to populate the Identity service database:
1
$ su -s /bin/sh -c "keystone-manage db_sync" keystone
The result:
12
CRITICAL keystone [-] ImportError: No module named MySQLdb
TRACE keystone ImportError: No module named MySQLdb
Install the python-mysqldb package:
1
$ apt-get install python-mysqldb
Now populate the keystone database:
1
$ su -s /bin/sh -c "keystone-manage db_sync" keystone
Error:
1
TRACE keystone OperationalError: (OperationalError)(2003, "Can't connect to MySQL server on 'controller' (110)") None None
Add controller to /etc/hosts:
12
# cat /etc/hosts127.0.0.1 localhost controller
Try to populate the keystone database (again):
1
$ su -s /bin/sh -c "keystone-manage db_sync" keystone
Success! You should now see a default set of tables pushed into the keystone database: