Ask Your Question
0

How to start nova services if we setup nova from github

asked 2013-03-21 16:00:38 -0500

sajuptpm gravatar image

updated 2014-07-15 10:54:11 -0500

smaffulli gravatar image

I am following below doc to setup Nova development environment. I installed nova successfully. Next i want to run all nova services, How do it ?? I am using Ubuntu 12.04 LTS

 saju@saju-desktop:~/openstk_manual/nova$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise

I tried

#source .venv/bin/activate
$ ./bin/nova-all

But getting following errors

  • Failed to load ec2-api, osapi_compute-api, metadata-api, nova-compute
  • ConfigNotFound: Could not find config at api-paste.ini
  • TRACE nova.service OperationalError: (OperationalError) no such table: services u'SELECT services.created_at

Steps I followed

sudo apt-get install python-dev libssl-dev python-pip git-core libxml2-dev libxslt-dev

#git clone https://github.com/openstack/nova.git
#cd nova
#python tools/install_venv.py

Successfully installed coverage discover feedparser fixtures mox MySQL-python psycopg2 pep8 pyflakes pylint python-subunit sphinx testrepository testtools logilab-common logilab-astng Pygments Jinja2 docutils extras Cleaning up...

Nova development environment setup is complete.

Nova development uses virtualenv to track and manage Python dependencies while in development and testing.

To activate the Nova virtualenv for the extent of your current shell session you can run:

$ source /home/saju/openstk_manual/nova/.venv/bin/activate

Or, if you prefer, you can run commands in the virtualenv on a case by case basis by running:

$ /home/saju/openstk_manual/nova/tools/with_venv.sh <your command>

Also, make test will automatically use the virtualenv.

#source .venv/bin/activate
$ ./bin/nova-all
ERRORS
(.venv)saju@saju-desktop:~/openstk_manual/nova$ ./bin/nova-all
2013-03-21 20:49:54.763 10926 ERROR nova.all [-] Failed to load ec2-api
2013-03-21 20:49:54.763 10926 TRACE nova.all Traceback (most recent call last):
2013-03-21 20:49:54.763 10926 TRACE nova.all   File "./bin/nova-all", line 67, in <module>
2013-03-21 20:49:54.763 10926 TRACE nova.all     server = service.WSGIService(api)
2013-03-21 20:49:54.763 10926 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/service.py", line 597, in __init__
2013-03-21 20:49:54.763 10926 TRACE nova.all     self.loader = loader or wsgi.Loader()
2013-03-21 20:49:54.763 10926 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/wsgi.py", line 469, in __init__
2013-03-21 20:49:54.763 10926 TRACE nova.all     raise exception.ConfigNotFound(path=config_path)
2013-03-21 20:49:54.763 10926 TRACE nova.all ConfigNotFound: Could not find config at api-paste.ini
2013-03-21 20:49:54.763 10926 TRACE nova.all 
2013-03-21 20:49:54.791 10926 ERROR nova.all [-] Failed to load osapi_compute-api
2013-03-21 20:49:54.791 10926 TRACE nova.all Traceback (most recent call last):
2013-03-21 20:49:54.791 10926 TRACE nova.all   File "./bin/nova-all", line 67, in <module>
2013-03-21 20:49:54.791 10926 TRACE nova.all     server = service.WSGIService(api)
2013-03-21 20:49:54.791 10926 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/service.py", line 597, in __init__
2013-03-21 20:49:54.791 10926 TRACE nova.all     self.loader = loader or wsgi.Loader()
2013-03-21 20:49:54.791 10926 TRACE nova.all   File "/home/saju/openstk_manual/nova ...
(more)
edit retag flag offensive close merge delete

Comments

did you use the Ubuntu or others, which version?

zzs gravatar imagezzs ( 2013-03-21 20:05:39 -0500 )edit

Hmmm, it strange, had you ever installed the Openstack components before, if not, the error message should not like this. Anyway, yes, please check the Devstack for detailed information of nova configuration.

zzs gravatar imagezzs ( 2013-03-22 22:52:50 -0500 )edit

11 answers

Sort by ยป oldest newest most voted
0

answered 2013-03-26 09:38:59 -0500

sajuptpm gravatar image

updated 2014-07-15 11:00:27 -0500

smaffulli gravatar image

It's working now I did following steps

# git checkout remotes/origin/stable/folsom
# ./bin/nova-manage db sync
# ./bin/nova-all

(.venv)saju@saju-desktop:~/openstk_manual/nova$ ./bin/nova-manage service list
Binary           Host                                 Zone             Status     State Updated_At
nova-cert        saju-desktop                         nova             enabled    XXX   2013-03-26 09:23:15.382040
nova-scheduler   saju-desktop                         nova             enabled    XXX   2013-03-26 09:23:15.523775
(.venv)saju@saju-desktop:~/openstk_manual/nova$

But, Failed to load nova-compute

Error : when running ./bin/nova-all (Fixed)

2013-03-26 13:15:13 15512 INFO nova.compute.manager [-] Loading compute driver 'nova.virt.connection.get_connection'
2013-03-26 13:15:13 15512 WARNING nova.common.deprecated [-] Deprecated Config: Specifying virt driver via connection_type is deprecated. Use compute_driver=classname instead.
2013-03-26 13:15:13 15512 ERROR nova.all [-] Failed to load nova-compute
2013-03-26 13:15:13 15512 TRACE nova.all Traceback (most recent call last):
2013-03-26 13:15:13 15512 TRACE nova.all   File "./bin/nova-all", line 76, in <module>
2013-03-26 13:15:13 15512 TRACE nova.all     launcher.launch_server(service.Service.create(binary=binary))
2013-03-26 13:15:13 15512 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/service.py", line 492, in create
2013-03-26 13:15:13 15512 TRACE nova.all     periodic_fuzzy_delay=periodic_fuzzy_delay)
2013-03-26 13:15:13 15512 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/service.py", line 387, in __init__
2013-03-26 13:15:13 15512 TRACE nova.all     self.manager = manager_class(host=self.host, *args, **kwargs)
2013-03-26 13:15:13 15512 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/compute/manager.py", line 223, in __init__
2013-03-26 13:15:13 15512 TRACE nova.all     importutils.import_object_ns('nova.virt', compute_driver),
2013-03-26 13:15:13 15512 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/openstack/common/importutils.py", line 53, in import_object_ns
2013-03-26 13:15:13 15512 TRACE nova.all     return import_class(import_str)(*args, **kwargs)
2013-03-26 13:15:13 15512 TRACE nova.all   File "/home/saju/openstk_manual/nova/nova/virt/connection.py", line 76, in get_connection
2013-03-26 13:15:13 15512 TRACE nova.all     raise exception.VirtDriverNotFound(name=FLAGS.connection_type)
2013-03-26 13:15:13 15512 TRACE nova.all VirtDriverNotFound: Could not find driver for connection_type None
2013-03-26 13:15:13 15512 TRACE nova.all 
2013-03-26 13:15:13 15512 INFO nova.service [-] Starting 1 workers
2013-03-26 13:15:13 15523 INFO nova.XCP VNC Proxy.wsgi.server [-] (15523) wsgi starting up on http://0.0.0.0:6081/

Fix-1 : I made following change to fix this error

a) Changed # connection_type=<None> to connection_type=libvirt in nova.conf

 # sudo vim /etc/nova/nova.conf

Error: when running ./bin/nova-all (After above change) (Not Fixed)

2013-03-26 13:39:59 18063 INFO nova.compute.manager [-] Loading compute driver 'nova.virt.connection.get_connection'
2013-03-26 13:39:59 18063 WARNING nova.common.deprecated [-] Deprecated Config: Specifying virt driver via connection_type is deprecated. Use compute_driver=classname instead.
[sudo] password for saju: 2013-03-26 13:39:59 18063 WARNING nova.virt.libvirt.firewall [-] Libvirt module could not be loaded. NWFilterFirewall will not work correctly.
2013-03-26 13:39:59 18063 ERROR nova.compute.manager [-] Unable ...
(more)
edit flag offensive delete link more
1

answered 2013-03-26 13:12:15 -0500

sajuptpm gravatar image

updated 2014-07-15 10:58:08 -0500

smaffulli gravatar image

Fixed the error : Unable to load the virtualization driver: No module named libvirt

Fix-1

sudo apt-get install python-libvirt
Update .venv/lib/python2.7/site-packages/easy-install.pth

But, after that when running ./bin/nova-all getting following erros

Error : when running ./bin/nova-compute OR ./bin/nova-all

(.venv)saju@saju-desktop:~/openstk_manual/nova$ ./bin/nova-compute
2013-03-26 16:34:21 25350 INFO nova.compute.manager [-] Loading compute driver 'nova.virt.connection.get_connection'
2013-03-26 16:34:21 25350 WARNING nova.common.deprecated [-] Deprecated Config: Specifying virt driver via connection_type is deprecated. Use compute_driver=classname instead.
2013-03-26 16:34:21 25350 AUDIT nova.service [-] Starting compute node (version 2012.2.4-LOCALBRANCH:LOCALREVISION)
libvir: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
Traceback (most recent call last):
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 346, in fire_timers
    timer()
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/event.py", line 163, in _do_send
    waiter.switch(result)
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 194, in main
    result = function(*args, **kwargs)
  File "/home/saju/openstk_manual/nova/nova/service.py", line 132, in run_server
    server.start()
  File "/home/saju/openstk_manual/nova/nova/service.py", line 398, in start
    self.manager.init_host()
  File "/home/saju/openstk_manual/nova/nova/compute/manager.py", line 268, in init_host
    self.driver.init_host(host=self.host)
  File "/home/saju/openstk_manual/nova/nova/virt/libvirt/driver.py", line 333, in init_host
    if not self.has_min_version(MIN_LIBVIRT_VERSION):
  File "/home/saju/openstk_manual/nova/nova/virt/libvirt/driver.py", line 322, in has_min_version
    libvirt_version = self._conn.getLibVersion()
  File "/home/saju/openstk_manual/nova/nova/virt/libvirt/driver.py", line 350, in _get_connection
    self._connect, self.uri, self.read_only)
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/tpool.py", line 147, in proxy_call
    rv = execute(f,*args,**kwargs)
  File "/home/saju/openstk_manual/nova/.venv/local/lib/python2.7/site-packages/eventlet/tpool.py", line 76, in tworker
    rv = meth(*args,**kwargs)
  File "/home/saju/openstk_manual/nova/nova/virt/libvirt/driver.py", line 404, in _connect
    return libvirt.openAuth(uri, auth, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
2013-03-26 16:34:21 25350 CRITICAL nova [-] Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
(.venv)saju@saju-desktop:~/openstk_manual/nova

I also fixed the error: Failed to connect socket to '/var/run/libvirt/libvirt-sock':, with following steps

Fix-2

  • Install libvirt-1.0 from tarball instructions
  • Run libvirtd deamon as root

    su - root

    libvirtd -d

c) Run ./bin/nova-all OR ./bin/nova-compute

The commands "nova-all" and "nova-compute" are prompted for sudo password and failed with following error

(.venv)saju ...
(more)
edit flag offensive delete link more
0

answered 2013-03-22 20:06:29 -0500

sajuptpm gravatar image

Hi, Jason (zzs)

I installed sudo apt-get build-dep python-mysqldb

Then ran #source .venv/bin/activate $ ./bin/nova-all

Got same error again

I tried in Ubuntu 12.10 ang getting same error

======== Complete Steps I followed ==========

#lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal

#sudo apt-get install python-dev libssl-dev python-pip git-core libxml2-dev libxslt-dev #sudo apt-get build-dep python-mysqldb #sudo apt-get install libpq-dev python-dev

#git clone https://github.com/openstack/nova.git #cd nova

#python tools/install_venv.py

#source .venv/bin/activate #./bin/nova-all

####### ERROR ##########

(.venv)saju@saju-Inspiron-N5010:~/ops_manual/nova$ ./bin/nova-all 2013-03-23 01:35:27.802 5250 ERROR nova.all [-] Failed to load ec2-api 2013-03-23 01:35:27.802 5250 TRACE nova.all Traceback (most recent call last): 2013-03-23 01:35:27.802 5250 TRACE nova.all File "./bin/nova-all", line 67, in <module> 2013-03-23 01:35:27.802 5250 TRACE nova.all server = service.WSGIService(api) 2013-03-23 01:35:27.802 5250 TRACE nova.all File "/home/saju/ops_manual/nova/nova/service.py", line 597, in __init__ 2013-03-23 01:35:27.802 5250 TRACE nova.all self.loader = loader or wsgi.Loader() 2013-03-23 01:35:27.802 5250 TRACE nova.all File "/home/saju/ops_manual/nova/nova/wsgi.py", line 469, in __init__ 2013-03-23 01:35:27.802 5250 TRACE nova.all raise exception.ConfigNotFound(path=config_path) 2013-03-23 01:35:27.802 5250 TRACE nova.all ConfigNotFound: Could not find config at api-paste.ini 2013-03-23 01:35:27.802 5250 TRACE nova.all 2013-03-23 01:35:27.804 5250 ERROR nova.all [-] Failed to load osapi_compute-api 2013-03-23 01:35:27.804 5250 TRACE nova.all Traceback (most recent call last): 2013-03-23 01:35:27.804 5250 TRACE nova.all File "./bin/nova-all", line 67, in <module> 2013-03-23 01:35:27.804 5250 TRACE nova.all server = service.WSGIService(api) 2013-03-23 01:35:27.804 5250 TRACE nova.all File "/home/saju/ops_manual/nova/nova/service.py", line 597, in __init__ 2013-03-23 01:35:27.804 5250 TRACE nova.all self.loader = loader or wsgi.Loader() 2013-03-23 01:35:27.804 5250 TRACE nova.all File "/home/saju/ops_manual/nova/nova/wsgi.py", line 469, in __init__ 2013-03-23 01:35:27.804 5250 TRACE nova.all raise exception.ConfigNotFound(path=config_path) 2013-03-23 01:35:27.804 5250 TRACE nova.all ConfigNotFound: Could not find config at api-paste.ini 2013-03-23 01:35:27.804 5250 TRACE nova.all 2013-03-23 01:35:27.871 5250 ERROR nova.all [-] Failed to load metadata-api 2013-03-23 01:35:27.871 5250 TRACE nova.all Traceback (most recent call last): 2013-03-23 01:35:27.871 5250 TRACE nova.all File "./bin/nova-all", line 67, in <module> 2013-03-23 01:35:27.871 5250 TRACE nova.all server = service.WSGIService(api) 2013-03-23 01:35:27.871 5250 TRACE nova.all File "/home/saju/ops_manual/nova/nova/service.py", line 597, in __init__ 2013-03-23 01:35:27.871 5250 TRACE nova.all self.loader = loader or wsgi.Loader() 2013-03-23 01:35:27.871 5250 TRACE ... (more)

edit flag offensive delete link more
0

answered 2013-03-25 22:48:26 -0500

zzs gravatar image

it looks like there is no services table inside the nova databases, so please check if it exists. can you try /bin/nova-manage db sync and run nova-all again.

edit flag offensive delete link more
0

answered 2013-03-22 18:04:00 -0500

zzs gravatar image

I think you need run the command between 1 and 2 if you are using the Pricise.

sudo apt-get build-dep python-mysqldb

edit flag offensive delete link more
0

answered 2013-03-25 14:25:32 -0500

sajuptpm gravatar image

Hi Keith Tobin,

I created a directory named "nova" under /etc and copied "api-paste.ini" from git repo to there.

I think, after that the command " ./bin/nova-all" started some services.

But again failed, Please check the atatched results of command "./bin/nova-all"

Getting the same error " no such table" again

also there is another errors like

  • AttributeError: 'module' object has no attribute 'Mount'
  • VirtDriverNotFound: Could not find driver for connection_type None
  • ImportError: Class MultiScheduler cannot be found (['Traceback (most recent call last
  • nova.service OperationalError: (OperationalError) no such table: services u'SELECT services.created

(.venv)saju@saju-desktop:~/openstk_manual/nova$ ./bin/nova-all 2013-03-25 19:47:23 15871 INFO nova.wsgi [-] ec2 listening on 0.0.0.0:8773 2013-03-25 19:47:23 15871 INFO nova.service [-] Starting 1 workers 2013-03-25 19:47:23 15871 INFO nova.service [-] Started child 15876 2013-03-25 19:47:23 15876 INFO nova.ec2.wsgi.server [-] (15876) wsgi starting up on http://0.0.0.0:8773/

2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.compute.extensions [-] Initializing extension manager. 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-volume-types 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: OS-SCH-HNT 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-deferred-delete 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: OS-FLV-EXT-DATA 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-multiple-create 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-consoles 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-volumes 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-flavor-extra-specs 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-hypervisors 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-flavor-swap 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-cloudpipe 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-simple-tenant-usage 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-floating-ip-pools 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-config-drive 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: OS-DCF 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-certificates 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-hosts 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-availability-zone 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: OS-FLV-DISABLED 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-quota-class-sets 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-flavor-rxtx 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-used-limits 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-instance_usage_audit_log 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-user-data 2013-03-25 19:47:23 15871 AUDIT nova.api.openstack.extensions [-] Loaded extension: os-rescue ... (more)

edit flag offensive delete link more
0

answered 2013-03-25 13:01:11 -0500

keith-tobin gravatar image

I had a quick look at you errors,

you need to verify that api-paste.ini is present and containers configuration data. api-paste.ini should be present in /etc/openstack/api-paste.ini you will need to configure the keystone parameters at the bottom of this file,

Make sure that the following parameter in nova.conf is set correctly, or commented out #api_paste_config=api-paste.ini

It also seems that you are missing tables in the mysql database, you need to configure the mysql database. You could login to mysql and confirm the tables do or not exist.

edit flag offensive delete link more
0

answered 2013-03-31 17:52:26 -0500

zzs gravatar image

I think you should create the instance directory by yourself and give the user permission. Also you have to add the user to the libvirtd user group if you do not want to run as root.

edit flag offensive delete link more
0

answered 2013-03-22 20:33:56 -0500

sajuptpm gravatar image

Hi, Jason (zzs)

There is two files ./etc/nova/api-paste.ini and ./etc/nova/nova.conf.sample

Do i need to setup any thing with these files before running #./bin/nova-all

(.venv)saju@saju-Inspiron-N5010:~/ops_manual/nova$ find . -name api-paste.ini* ./etc/nova/api-paste.ini

(.venv)saju@saju-Inspiron-N5010:~/ops_manual/nova$ find . -name nova.conf* ./etc/nova/nova.conf.sample

edit flag offensive delete link more
0

answered 2013-03-25 13:51:47 -0500

sajuptpm gravatar image

Hi Keith Tobin,

1) In my system, no such folder "openstack" or "nova" under /etc

(.venv)saju@saju-desktop:~/openstk_manual/nova$ cd /etc/op openal/ openvpn/ opt/

(.venv)saju@saju-desktop:~/openstk_manual/nova$ cd /etc/no

2) But, I could find similar file "api-paste.ini" and "nova.conf.sample" in git repo

(.venv)saju@saju-desktop:~/openstk_manual/nova/etc/nova$ pwd /home/saju/openstk_manual/nova/etc/nova

(.venv)saju@saju-desktop:~/openstk_manual/nova/etc/nova$ ls api-paste.ini logging_sample.conf nova.conf.sample policy.json rootwrap.conf rootwrap.d

3) The database "nova.sqlite" is creating auto when running ./bin/nova-all

4) Sould I create a folder named "openstack" unde /etc ??? and copy the files "api-paste.ini" and "nova.conf.sample" from git repo to there ???

Thanks,

edit flag offensive delete link more

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: 2013-03-21 16:00:38 -0500

Seen: 1,027 times

Last updated: Jul 15 '14