setup.cfg contains non existing driver

Bug #1180641 reported by Tong Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Unassigned

Bug Description

setup.cfg contains the following publisher which does not exist

 meter_publisher = ceilometer.publisher.meter:MeterPublisher

when run setup.py develop/install, it won't create the swift middleware entry point neither.

To fix the problem, we need to remove the line for meter_publisher and add the following line

paste.filter_factory =
    swift = ceilometer.objectstore.swift_middleware:filter_factory

The bug causes ceilometer won't start

Revision history for this message
Feilong Wang (flwang) wrote :

Tong, I can see the ceilometer.publisher.meter:MeterPublisher in the source folder, what did you mean it's not existed?

Revision history for this message
sash-kan (alex-barakin) wrote :
Download full text (4.2 KiB)

> what did you mean

perhaps this error:

stack@devstack:~/last/devstack$ cd /opt/stack/last/ceilometer && /opt/stack/last/ceilometer/bin/ceilometer-api -d -v --log-dir=/var/log/ceilometer-api --config-file /etc/ceilometer/ceilometer.conf || touch "/opt/stack/last/status/stack/ceilometer-api.failure"
2013-05-16 11:37:52 INFO [keystoneclient.middleware.auth_token] Starting keystone auth_token middleware
2013-05-16 11:37:52 INFO [keystoneclient.middleware.auth_token] Using /var/cache/ceilometer as cache directory for signing certificate
2013-05-16 11:37:52 ERROR [stevedore.extension] Could not load 'meter_publisher': __init__() got an unexpected keyword argument 'deprecated_group'
2013-05-16 11:37:52 ERROR [stevedore.extension] __init__() got an unexpected keyword argument 'deprecated_group'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 75, in _load_plugins
    invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/enabled.py", line 45, in _load_one_plugin
    ep, invoke_on_load, invoke_args, invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 87, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/opt/stack/last/ceilometer/ceilometer/publisher/meter.py", line 39, in <module>
    deprecated_group="DEFAULT",
TypeError: __init__() got an unexpected keyword argument 'deprecated_group'
2013-05-16 11:37:52 ERROR [stevedore.extension] Could not load 'meter': __init__() got an unexpected keyword argument 'deprecated_group'
2013-05-16 11:37:52 ERROR [stevedore.extension] __init__() got an unexpected keyword argument 'deprecated_group'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 75, in _load_plugins
    invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/enabled.py", line 45, in _load_one_plugin
    ep, invoke_on_load, invoke_args, invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 87, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/opt/stack/last/ceilometer/ceilometer/publisher/meter.py", line 39, in <module>
    deprecated_group="DEFAULT",
TypeError: __init__() got an unexpected keyword argument 'deprecated_group'
2013-05-16 11:37:52 DEBUG [ceilometer.pipeline] Pipeline config file: /etc/ceilometer/pipeline.yaml
2013-05-16 11:37:52 INFO [ceilometer.pipeline] Pipeline config: [{'publishers': ['meter'], 'interval': 60, 'transformers': None, 'name': 'meter_pipeline', 'counters': ['*']}]
2013-05-16 11:37:52 CRITICAL [ceilometer] Pipeline {'publishers': ['meter'], 'interval': 60, 'transformers': None, 'name': 'meter_pipeline', 'counters': ['*']}: Publishers set(['meter']) invalid
Traceback (most recent call last):
  File "/opt/stack/last/ceilometer/bin/ceilometer-api", line 40, in <...

Read more...

Revision history for this message
sash-kan (alex-barakin) wrote :

after switching to commit a60fc5b (in ceilometer repo) error disappears.
$ git log -1
Author: Angus Salkeld <email address hidden>
Date: Thu May 9 12:07:22 2013 +1000

    Fix the nova notifier tests after a nova rename

    https://github.com/openstack/nova/commit/3222d8bb021effb3156ed86e263cdc0ac64fd44a

    fixes bug 1178055

    Change-Id: I49f530a73c70a3efbec000e5de493b0d82ad3435

Revision history for this message
sash-kan (alex-barakin) wrote :

sorry, incorrect insertion.

$ git log -1
commit a60fc5b59a5f7fcf87ee466c46c86e7814ade2df
Author: Angus Salkeld <email address hidden>
Date: Thu May 9 12:07:22 2013 +1000

    Fix the nova notifier tests after a nova rename

    https://github.com/openstack/nova/commit/3222d8bb021effb3156ed86e263cdc0ac64fd44a

    fixes bug 1178055

    Change-Id: I49f530a73c70a3efbec000e5de493b0d82ad3435

Revision history for this message
Julien Danjou (jdanjou) wrote :

What's your oslo.config version?
Sounds like it's too old to me.

Revision history for this message
Tong Li (litong01) wrote :

oslo.config>=1.1.0

That is from the requires.txt file. and I think that is not the problem.

Revision history for this message
Tong Li (litong01) wrote :

This is what happened when I saw the problem. had devstack setup using a fresh 12.10 ubuntu server. Everything worked fine but
ceilometer won't have the latest code. The code pulled down was from April 2nd. Then I did a git pull for Ceilometer and run stack.sh
again. After the script finishes, ceilometer won't start and here is the here.

tong@ubuntu1210:/opt/devstack$ 2013-05-16 09:52:39 INFO [ceilometer.openstack.common.rpc.common] Connected to AMQP server on localhost:5672
2013-05-16 09:52:39 ERROR [stevedore.extension] Could not load 'network_floatingip': (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))
2013-05-16 09:52:39 ERROR [stevedore.extension] (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 75, in _load_plugins
    invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/enabled.py", line 45, in _load_one_plugin
    ep, invoke_on_load, invoke_args, invoke_kwds,
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 87, in _load_one_plugin
    plugin = ep.load()
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 569, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))
2013-05-16 09:52:39 ERROR [stevedore.extension] Could not load 'objectstore': (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))

Then I noticed this line.

 Could not load 'objectstore': (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))

seems module requests are not working, then I changed requires.txt not to require requests>=1.1 so the requires.txt looks like this:
      requests>=0.14.2

Restart the ceilometer and things started working.

The dependencies work with original fresh devstack install. But after git pull latest ceilometer, some thing went wrong of changing requests to be 0.14.2 but the required is still 1.1. So things fall apart. I noticed that the setup.py has changed to use
setup.cfg, did that cause any problems?

Also as I described in earlier note, the swift filter is no longer declared in the entry_points.txt file.

Revision history for this message
Julien Danjou (jdanjou) wrote :

> oslo.config>=1.1.0
>
> That is from the requires.txt file. and I think that is not the problem.

Your backtrace shows:

TypeError: __init__() got an unexpected keyword argument 'deprecated_group'

Which makes me think that your oslo.config version is old and doesn't support this argument.

I already know what's in pip-requires, so there's no point quoting that. My question was rather "what's on YOUR system", since I don't have access to it.

But if you don't think that's the problem to this particular backtrace, I don't have any more idea.

Changed in ceilometer:
status: New → Incomplete
Revision history for this message
Tong Li (litong01) wrote :

Julien,
   I think you looked at someone else trace. that deprecated group you refer to was from sash-kan (alex-barakin) . The error from
my system does not show that at all.

Revision history for this message
Tong Li (litong01) wrote :

Fei Long,
 the meter_publish at one point refering to meter_publisher.py, this thing keeps changing, but the latest code have both
meter and meter_publish defined. though they point to the same class, but it shows the duplicate.

Revision history for this message
sash-kan (alex-barakin) wrote :

Julien Danjou
> What's your oslo.config version?
$ locate oslo.config
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0-nspkg.pth
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/PKG-INFO
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/SOURCES.txt
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/dependency_links.txt
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/installed-files.txt
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/namespace_packages.txt
/usr/local/lib/python2.7/dist-packages/oslo.config-1.1.0.egg-info/top_level.txt
/var/cache/pip/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fo%2Foslo.config%2Foslo.config-1.1.0.tar.gz
/var/cache/pip/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fo%2Foslo.config%2Foslo.config-1.1.0.tar.gz.content-type

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

Revision history for this message
Tong Li (litong01) wrote :

Did more digging and here is what I found

recently something changed in Ceilometer which requires requests 1.1 or greater and

sudo python setup.py develop/install won't update requests if requests is down level, the setup will happily finish without any
error.

but starting ceilometer collector will fail with a message like this.

2013-05-16 15:05:58 ERROR [stevedore.extension] Could not load 'accumulator': (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))
2013-05-16 15:05:58 ERROR [stevedore.extension] (requests 0.14.2 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests>=1.1'))
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 75, in _load_plugins
    invoke_kwds,

seems to me somewhere, Ceilometer or something Ceilometer depends on requires requests 1.1 or great

Revision history for this message
sash-kan (alex-barakin) wrote :

Tong Li

i have version 1.2.0:
$ ls -1d /usr/local/lib/python2.7/dist-packages/requests*
/usr/local/lib/python2.7/dist-packages/requests
/usr/local/lib/python2.7/dist-packages/requests-1.2.0.egg-info

Revision history for this message
sash-kan (alex-barakin) wrote :

hmm. after removal of the status/stack/ceilometer-*.failure the ceilometer started to work…

Revision history for this message
Tong Li (litong01) wrote :

Sash-kan,
Right I cleaned up my env. when I installed ceilometer , it will upgrade requests to 1.2 which is the latest at this point. So these errors
went away.

For the duplicate of the publisher driver, after discussion, it was confirmed that two publishers one is meter which is new, the other
one meter_publisher was kept for backward compatibility considerations. So this bug is now only for missing the swift egg.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/29421
Committed: http://github.com/openstack/ceilometer/commit/6d02d9c77628ad80e0d132a950e301b196dd8e8a
Submitter: Jenkins
Branch: master

commit 6d02d9c77628ad80e0d132a950e301b196dd8e8a
Author: Tong Li <email address hidden>
Date: Tue May 21 14:54:00 2013 -0400

    setup.cfg misses swift filter

    The file misses the swift middleware filter
    paste.filter_factory =
    swift = ceilometer.objectstore.swift_middleware:filter_factory

    Change-Id: If7d844fdbcc4dc2b3ad0a0e184ac10fb7515d864
    fixes: Bug #1180641

Changed in ceilometer:
status: Incomplete → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-1
status: Fix Committed → Fix Released
Eoghan Glynn (eglynn)
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/31207

Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-1 → 2013.2
Alan Pevec (apevec)
Changed in ceilometer:
importance: Undecided → Low
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.