run_test.sh errors on Parent Module 'nova manage'

Asked by Shannon McFarland

I have followed the instructions for the Xen setup: http://wiki.openstack.org/XenServerDevelopment

Everything is great up until I run the run_tests.sh -x -N line.

I get the output in the log of (sorry for long paste):
ERROR

======================================================================
ERROR: <nose.suite.ContextSuite context=nova.tests>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 478, in try_run
    return func()
  File "/home/localadmin/openstack/nova/nova/tests/__init__.py", line 47, in setup
    from nova.network import manager as network_manager
  File "/home/localadmin/openstack/nova/nova/network/manager.py", line 65, in <module>
    from nova.compute import api as compute_api
  File "/home/localadmin/openstack/nova/nova/compute/__init__.py", line 19, in <module>
    from nova.compute.api import API
  File "/home/localadmin/openstack/nova/nova/compute/api.py", line 30, in <module>
    import nova.image
  File "/home/localadmin/openstack/nova/nova/image/__init__.py", line 25, in <module>
    from nova.image import glance as glance_image_service
  File "/home/localadmin/openstack/nova/nova/image/glance.py", line 33, in <module>
    from nova.image import service
ImportError: cannot import name service
-------------------- >> begin captured logging << --------------------
2011-08-18 17:00:31,813 DEBUG nova.utils [-] Inner Exception: No module named kombu.connection from (pid=1237) import_class /home/localadmin/openstack/nova/nova/utils.py:64
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 0 tests in 0.024s

FAILED (errors=1)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin xcover = nosexcover:XCoverage: (coverage 3.5 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('coverage==3.4'))
  RuntimeWarning)
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
2011-08-18 17:00:31,813 DEBUG nova.utils [-] Inner Exception: No module named kombu.connection from (pid=1237) import_class /home/localadmin/openstack/nova/nova/utils.py:64
/home/localadmin/openstack/nova/bin/nova-manage:56: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import gettext
/home/localadmin/openstack/nova/bin/nova-manage:57: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import glob
/home/localadmin/openstack/nova/bin/nova-manage:58: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import json
/home/localadmin/openstack/nova/bin/nova-manage:59: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import math
/home/localadmin/openstack/nova/bin/nova-manage:60: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import netaddr
/home/localadmin/openstack/nova/bin/nova-manage:61: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import os
/home/localadmin/openstack/nova/bin/nova-manage:62: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import sys
/home/localadmin/openstack/nova/bin/nova-manage:63: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  import time
/home/localadmin/openstack/nova/bin/nova-manage:65: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from optparse import OptionParser
/home/localadmin/openstack/nova/bin/nova-manage:77: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import context
/home/localadmin/openstack/nova/bin/nova-manage:78: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import crypto
/home/localadmin/openstack/nova/bin/nova-manage:79: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import db
/home/localadmin/openstack/nova/bin/nova-manage:80: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import exception
/home/localadmin/openstack/nova/bin/nova-manage:81: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import flags
/home/localadmin/openstack/nova/bin/nova-manage:82: RuntimeWarning: Parent module 'nova_manage' not found while handling absolute import
  from nova import image

Any clue on the issue?

Thanks,
Shannon

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vish Ishaya
Solved:
Last query:
Last reply:
Revision history for this message
Shannon McFarland (shmcfarl) said :
#1

It actually looks like anyting with nova-manage is hosed.

I get the following no matter what I do with nova-manage:

./bin/nova-manage
Traceback (most recent call last):
  File "./bin/nova-manage", line 82, in <module>
    from nova import image
  File "/home/localadmin/openstack/nova/nova/image/__init__.py", line 25, in <module>
    from nova.image import glance as glance_image_service
  File "/home/localadmin/openstack/nova/nova/image/glance.py", line 42, in <module>
    GlanceClient = utils.import_class('glance.client.Client')
  File "/home/localadmin/openstack/nova/nova/utils.py", line 65, in import_class
    raise exception.ClassNotFound(class_name=class_str)
nova.exception.ClassNotFound: Class Client could not be found

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

Looks like you need to install glance. You can install it via pip -> pip install glance
On Aug 18, 2011, at 4:15 PM, Shannon McFarland wrote:

> Question #168471 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/168471
>
> Shannon McFarland gave more information on the question:
> It actually looks like anyting with nova-manage is hosed.
>
> I get the following no matter what I do with nova-manage:
>
> ./bin/nova-manage
> Traceback (most recent call last):
> File "./bin/nova-manage", line 82, in <module>
> from nova import image
> File "/home/localadmin/openstack/nova/nova/image/__init__.py", line 25, in <module>
> from nova.image import glance as glance_image_service
> File "/home/localadmin/openstack/nova/nova/image/glance.py", line 42, in <module>
> GlanceClient = utils.import_class('glance.client.Client')
> File "/home/localadmin/openstack/nova/nova/utils.py", line 65, in import_class
> raise exception.ClassNotFound(class_name=class_str)
> nova.exception.ClassNotFound: Class Client could not be found
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Brian Lamar (blamar) said :
#3

There is also an error in there saying "No module named kombu.connection". Kombu is a recently added dependency and might be the root of the issue here.

Revision history for this message
Shannon McFarland (shmcfarl) said :
#4

Sorry for the delay in getting back to this.

Vish, glance was already installed.

I do get errors related to kombu.connection on the nova run_tests and also the glance run_tests.

Glance:
ERROR: Failure: ImportError (No module named kombu.connection)

Nova:
2011-08-22 13:27:56,843 DEBUG nova.utils [-] Inner Exception: No module named kombu.connection from (pid=1322) import_class /home/localadmin/openstack/nova/nova/utils.py:64

I am not sure if kumbu is the root cause but the logs seem to be whining a lot about it. ;-)

Revision history for this message
Best Vish Ishaya (vishvananda) said :
#5

Yes glance has a dependency on kombu. You can apt-get install python-kombu from the glance core ppa or you can try to pip install it

Vish

On Aug 22, 2011, at 12:35 PM, Shannon McFarland wrote:

> Question #168471 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/168471
>
> Status: Answered => Open
>
> Shannon McFarland is still having a problem:
> Sorry for the delay in getting back to this.
>
> Vish, glance was already installed.
>
> I do get errors related to kombu.connection on the nova run_tests and
> also the glance run_tests.
>
> Glance:
> ERROR: Failure: ImportError (No module named kombu.connection)
>
> Nova:
> 2011-08-22 13:27:56,843 DEBUG nova.utils [-] Inner Exception: No module named kombu.connection from (pid=1322) import_class /home/localadmin/openstack/nova/nova/utils.py:64
>
> I am not sure if kumbu is the root cause but the logs seem to be whining
> a lot about it. ;-)
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Shannon McFarland (shmcfarl) said :
#6

Thanks Vish Ishaya, that solved my question.