installing Nova on CentOS

Asked by Pablo Alvarez

I'm installing nova on CentOS 5.5 and I have not solve this problem.

When I exec: # nova-api "$NOVA_DIR/bin/nova-api --flagfile=/etc/nova/nova-manage.conf"

I got the message:

Traceback (most recent call last):
  File "/usr/bin/nova-api", line 5, in <module>
    pkg_resources.run_script('nova==2010.1', 'nova-api')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/nova-2010.1-py2.6.egg/EGG-INFO/scripts/nova-api", line 37, in <module>
    from nova import server
  File "/usr/lib/python2.6/site-packages/nova-2010.1-py2.6.egg/nova/server.py", line 24, in <module>
    from daemon import pidlockfile
ImportError: cannot import name pidlockfile

I can't find the package pidlockfile.

If anybody can help me I appreciate.

Best Regards,

Pablo Alvarez
E-mail: <email address hidden>

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Clare Liguori
Solved:
Last query:
Last reply:
Revision history for this message
Best Clare Liguori (clare-liguori) said :
#1

Sounds like you're missing a dependency (python-daemon). I haven't tried it, but "easy_install-2.6 python-daemon" should resolve that.

-- Clare Liguori

Revision history for this message
Pablo Alvarez (pablo-openb) said :
#2

the package Python-daemon was installed,

[root@cloud nova-2010.1]# easy_install-2.6 python-daemon
Searching for python-daemon
Best match: python-daemon 1.5.5
Processing python_daemon-1.5.5-py2.6.egg
python-daemon 1.5.5 is already the active version in easy-install.pth

Using /usr/lib/python2.6/site-packages/python_daemon-1.5.5-py2.6.egg
Processing dependencies for python-daemon
Finished processing dependencies for python-daemon

But I tried to upgrade with:

[root@cloud nova-2010.1]# easy_install-2.6 -U python-daemon
Searching for python-daemon
Reading http://pypi.python.org/simple/python-daemon/
Best match: python-daemon 1.6
Downloading http://pypi.python.org/packages/source/p/python-daemon/python-daemon-1.6.tar.gz#md5=c774eda27d6c5d80b42037826d29e523
Processing python-daemon-1.6.tar.gz
Running python-daemon-1.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-yByCjD/python-daemon-1.6/egg-dist-tmp-xjxsYW
Removing python-daemon 1.5.5 from easy-install.pth file
Adding python-daemon 1.6 to easy-install.pth file

Installed /usr/lib/python2.6/site-packages/python_daemon-1.6-py2.6.egg
Processing dependencies for python-daemon
Finished processing dependencies for python-daemon

I exec again:

[root@cloud nova-2010.1]# nova-api "$NOVA_DIR/bin/nova-api --flagfile=/etc/nova/nova-manage.conf" start
Traceback (most recent call last):
  File "/usr/bin/nova-api", line 5, in <module>
    pkg_resources.run_script('nova==2010.1', 'nova-api')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/nova-2010.1-py2.6.egg/EGG-INFO/scripts/nova-api", line 37, in <module>
    from nova import server
  File "/usr/lib/python2.6/site-packages/nova-2010.1-py2.6.egg/nova/server.py", line 24, in <module>
    from daemon import pidlockfile
ImportError: cannot import name pidlockfile

and the error continues. Some idea?

Revision history for this message
Clare Liguori (clare-liguori) said :
#3

I was able to reproduce this on a clean CentOS 5.5 install by following the instructions at http://wiki.openstack.org/NovaInstall#Nova_installation_on_CentOS_5.5.

The culprits on my machine were:
1) Conflict with the "daemon" package vs the "python-daemon" package. The daemon package is listed in the wiki instructions, when it should be "python-daemon".
*To resolve*: easy_install-2.6 -mxN daemon

2) python-daemon 1.6 breaks compatibility with earlier versions (pidlockfile.py is renamed to pidfile.py). Make sure 1.5.5 is installed.
*To resolve*: easy_install-2.6 python-daemon==1.5.5
More information: http://sourceforge.net/support/tracker.php?aid=3000179

3) lockfile 0.9.1 package is installed by python-daemon, but that version has a known bug in it, giving a TypeError error on "from daemon import pidlockfile". Make sure 0.8 is installed.
*To resolve*: easy_install-2.6 lockfile==0.8
More information: https://bugzilla.redhat.com/show_bug.cgi?id=612403

Revision history for this message
Pablo Alvarez (pablo-openb) said :
#4

Thanks Clare Liguori, that solved my question.