apt-get install keystone errors out

Asked by Neil Jubinville

Hi I am following the Ubuntu quick start to test out the Essex release - http://docs.openstack.org/

I am installing on physical hardware on Ubuntu 12.04 , I previously had a working devstack and removed it to focus on the above install guide.

The keystone install seems to want to error out as below: ( What migh the 2012.1 vs 2012.2 indicate? ) I have run both apt-get update and upgrade ... I get this output on other apt-get calls too which is strange and indicates some failed processing state of apt-get itself.

Here is the command and trace:

root@cloud1:~# apt-get install keystone
Reading package lists... Done
Building dependency tree
Reading state information... Done
keystone is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up keystone (2012.1-0ubuntu1) ...
Traceback (most recent call last):
  File "/usr/local/bin/keystone-manage", line 4, in <module>
    from pkg_resources import require; require('keystone==2012.2')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2711, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: keystone==2012.2
dpkg: error processing keystone (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 keystone
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Identity (keystone) Edit question
Assignee:
No assignee Edit question
Solved by:
Neil Jubinville
Solved:
Last query:
Last reply:
Revision history for this message
koolhead17 (koolhead17) said :
#1

try sudo apt-get remove --purge keystone

and then

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install keystone

Revision history for this message
Neil Jubinville (neil-orbitalsoftware) said :
#2

No go. Tried it , removal seemed to work better but the install failed just the same.

Can anyone comment on the 2012.2 vs 2012.1 reference and if a seperate PPA needs to be added? (or maybe removed if the devstack scripts had done something? )

Link of interest: http://fnords.wordpress.com/2011/06/15/delivery-channels/

Revision history for this message
Neil Jubinville (neil-orbitalsoftware) said :
#3

OK I fixed it.

If anyone else runs into this, after removing what you think is everything devstack installs there is one final step...

Note the error above : File "/usr/local/bin/keystone-manage" ... this implies a reference.

devstack copies from its bin install dirs to the usr/bin so make sure to delete all of those...

and you should be rewarded with a
keystone start/running, process 9574

:)

Neil

Revision history for this message
Zach Antonas (zantonas) said :
#4

Thanks Neil!

Revision history for this message
Wyllys Ingersoll (wyllys66) said :
#5

I had the same problem and also found that if the /var/lib/keystone/keystone.db is not removed, the re-install will fail.

If /etc/keystone is not present but /var/lib/keystone/keystone.db IS present (from a previous attempt), the postinstall will fail.

This is likely because the keystone package install scripts do not do a good enough job in verifying that all of the configs are in place and are easily fooled by leftovers from a previous installation that wasn't completely removed.

I finally had success when I removed everything from /etc/keystone and /var/lib/keystone, only then was I able to re-install it successfully.