running gnocchi-api with swift all-in-one install fails

asked 2014-05-27 06:52:42 -0600

atmalagon gravatar image

updated 2014-05-28 09:51:20 -0600


I'm trying to run gnocchi [1] with a Swift all-in-one install on a Ubuntu 12.04 VM, but am getting the following errors when trying gnocchi out:

  1. running ./ for gnocchi returns ImportError: no module named common.db.sqlalchemy.test_migrations and
  2. running /usr/local/bin/gnocchi-api --config-file ~/gnocchi/setup.cfg returns 14542 CRITICAL: AttributeError: 'NoneType' Object has no attribute 'drivername'

    I installed Swift as an all-in-one [2] and it passed all tests; I cloned the gnocchi repo from the stackforge github page and ran sudo python install as welll as sudo pip install -r requirements.txt and sudo pip install -r test-requirements.txt (also had to install libpq-dev and build-essential).



[2] (

Update: Thanks Eoghan for the explanation! I added a gnocchi.conf file in /etc/gnocchi/ which looks like this:

port = 8041
host =

swift_auth_version = 1
swift_authurl = http://localhost:8080/auth/v1.0
swift_user = admin:admin
swift_key = admin
swift_coordination_driver = memcached

driver = sqlalchemy

connection = sqlite:////opt/stack/gnocchi/gnocchi/openstack/common/db/gnocchi.sqlite
sqlite_db = gnocchi.sqlite

now I get an OperationalError: unable to open database file when running gnocchi-api --debug --config-file /etc/gnocchi/gnocchi.conf :

I also tried running gnocchi on a VM with a devstack environment that had swift enabled; this produces the same error message as above when running gnocchi-api, but a different error message when trying ./ :

(I checked my version of msgpack with pip freeze and it is 0.1.10.)

edit retag flag offensive close merge delete


Sorry, looks like at least part of this was due to a very silly error: I had installed gnocchi to my home directory, instead of /opt/stack, which was why I was getting the OperationalError. Still getting the msgpack errors for run-tests though.

atmalagon gravatar imageatmalagon ( 2014-05-28 10:01:43 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-27 16:42:15 -0600

Hi Ana,

Looks like you're passing the wrong type of config file:

/usr/local/bin/gnocchi-api --config-file ~/gnocchi/setup.cfg

That setup.cfg is used by to generate the entry_points.txt, the gnocchi-api console scripts and the likes.

Whereas you need a .conf file in the oslo.config format, containing definitions for the config options needed by gnocchi, e.g.

  driver = swift
  compression_level = 2
  swift_user = anamalagon:passwd

  driver = sqlalchemy

Note those are just some random config options I pulled from the code, not intended to be a complete/working set of config. I'll try to get you a working example gnocchi.conf for tomorrow.

Cheers, Eoghan

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-27 06:52:42 -0600

Seen: 1,585 times

Last updated: May 28 '14