Ask Your Question
1

keystone-manage db_sync failure

asked 2014-07-28 12:51:42 -0600

t-madd gravatar image

I have openstack-keystone 2014.1-0.6 installed and when I run the su -s /bin/sh -c "keystone-manage db_sync" keystone command I get the following error

File "/usr/bin/keystone-manage", line 37, in <module> from keystone import cli File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 26, in <module> from keystone import token File "/usr/lib/python2.6/site-packages/keystone/token/_init_.py", line 17 in <module> from keystone.token import controllers File "/usr/lib/python2.6/site-packages/keystone/token/controllers.py", line 18 in <module> from keystoneclient.common import cms ImportError: No module named common

I updated the /etc/keystone/keystone.conf file as stated in the openstack icehouse directions.
Does anyone have any idea what could be wrong? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-28 13:27:03 -0600

rooter gravatar image

You're likely missing the keystone packages which provide this module. This would explain the import error. This package would be python-keystoneclient. That's the one providing the module you've mentioned (keystoneclient.common).

[root@openstack1 common]# rpm -qa | grep keystone
python-keystoneclient-0.9.0-1.el6.noarch
python-keystone-2014.1.1-1.el6.noarch
openstack-keystone-2014.1.1-1.el6.noarch

If you have the package, check if the files are actually there, maybe they got removed...

[root@openstack1 common]# ls -la /usr/lib/python2.6/site-packages/keystoneclient/common/
total 56
drwxr-xr-x  2 root root  4096 Jul 11 06:28 .
drwxr-xr-x 13 root root  4096 Jul 11 06:28 ..
-rw-r--r--  1 root root 12849 May 29 09:59 cms.py
-rw-r--r--  2 root root 11450 Jun  5 09:15 cms.pyc
-rw-r--r--  2 root root 11450 Jun  5 09:15 cms.pyo
-rw-r--r--  1 root root     0 May 29 09:59 __init__.py
-rw-r--r--  2 root root   153 Jun  5 09:15 __init__.pyc
-rw-r--r--  2 root root   153 Jun  5 09:15 __init__.pyo
edit flag offensive delete link more

Comments

I am having the same issue:

root@unbuntu12-41-109:/openstack# keystone-manage
Traceback (most recent call last):
  File "/usr/local/bin/keystone-manage", line 30, in <module>
    from keystone import cli
  File "/usr/local/lib/python2.7/dist-packages/keystone/cli.py", line 20, in <module>
    import pbr.version
ImportError: No module named pbr.version
root@unbuntu12-41-109:/openstack#

and i have following modules:

root@unbuntu12-41-109:/openstack# sudo pip freeze | grep -i keystone
keystone==2014.2.dev19.g4cbe8ca
keystonemiddleware==1.0.0.15.g1ed7d54
python-keystoneclient==0.10.1.3.g83bef74

i also have the files in place:

root@unbuntu12-41-109:/openstack# ls -la /usr/local/lib/python2.7/dist-packages/keystoneclient/common/
total 40
drwxr-sr-x  2 root staff  4096 Jul 28 14:34 .
drwxr-sr-x 14 root staff  4096 Jul 28 14:34 ..
-rw-r--r--  1 root staff 13314 Jul 28 14:34 cms.py
-rw-r--r--  1 root staff 11510 Jul 28 14:34 cms.pyc
-rw-r--r--  1 root ...
(more)
humblearner gravatar imagehumblearner ( 2014-07-28 19:43:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-28 12:51:42 -0600

Seen: 2,155 times

Last updated: Jul 28 '14