This fixes the bin/ceilometer-send-counter program that has been broken
after the implementation of multi-publisher.
We also add a test to see if it runs!
This fixes bug #1133226
Change-Id: I922c7a000e942ee28d840f4cd65d13898d6d23a8
Signed-off-by: Julien Danjou <julien@danjou.info>
Changes the agent manager to poll based on pipeline configuration, to
support different interval requirement from different publishers.
This patch clean up the test case for agent managers. It makes the changes
a bit bigger, however, it's not so easy to seprate this cleanup patch
with different interval part.
For bp publisher-counters-frequency
Change-Id: I3c1163e37de6a17261d2c570843845696ebff58f
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
For each testenv in tox.ini which overrides the base testenv deps list,
explicitly include {pip,test}-requires in the list so that oslo-config
doesn't fail to install later when easy_install attempts to install
the tarball when doing 'python setup.py install'.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
This update brings in the new join_consumer_pool()
method of the message bus connection class.
Change-Id: Ie5b9bf93c9aaf8f4f85b47b2394969741ba5fef4
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This adds some test to be sure options passed to the middleware are read and
user properly.
This fixes bug #1099739
Change-Id: I491db4d2c7387cc2848ebefbbb579597234a82b0
Signed-off-by: Julien Danjou <julien@danjou.info>
* change pollsters and notification handlers to report units
* modify db storage to store units in counters
Change-Id: Ibd7e52623b84d26ca7bbc9f260c20fdf1d61a4bc
Implements: blueprint provide-meter-units
Things changed, and the configuration wasn't read anymore. This patch fixes
that. It also remove duplicated code in acl.py, so the problem is fixed only
in one place. Finally, it uses prepare_service() to find the right
configuration file for ceilometer.
This fixes bug #1098204
Change-Id: I0d6c30ad443a4d0db201e60d12b275625a4bee6e
Signed-off-by: Julien Danjou <julien@danjou.info>
API v2 is not finished and should only be optionnal. Move the binary as
api-v2 and remove the dep on pecan, only use it for tests.
This also fixes bug #1092227.
Change-Id: Ifaf0ad3918460bc2107e1563f0539695467a1856
Signed-off-by: Julien Danjou <julien@danjou.info>
This binary didn't get modified, so add test to be sure we don't miss it
next time.
Change-Id: I62692e7ee2fd8dd0f4845d130d6b193c7849c5f9
Signed-off-by: Julien Danjou <julien@danjou.info>
Currently, calling ceilometer-dbsync will be default raises an error since
it tries to upgrade a SQL database, even if mongo (the default) is used.
This patch fixes that by adding an upgrade capability to the storage engine
connection base class, and implementing it only in SQL.
Change-Id: I9a0da235ef3a93aaefd1b122d59f244ea293e9fe
Signed-off-by: Julien Danjou <julien@danjou.info>
Ceilometer uses mongodb as the default storage.
This is one of the patches to support sql db option in devstack for
ceilometer, so users can easily choose and set up sql db environment
for ceilometer with 'stack.sh' by explicitly specifying the following
statement in localrc:
use_database mysql
where mysql is taken as an example.
If users remove the above statement, mongodb is used and set up
by default.
This patch is for devstack to call dbsync to create ceilometer tables.
Change-Id: Idc9bffd0f389fa9760946b412c39210f60042d90
Signed-off-by: Shane Wang <shane.wang@intel.com>
This changeset reimplements the API
using Pecan and WSME instead of Flask.
Pecan uses "object dispatch" instead of
declared routes. The controller classes
are chained together to implement the
API. Most of what we have are simple
REST lookups, but a few cases required
custom methods.
WSME is used to define types of inputs
and outputs for each controller method.
The WSME layer handles serizlization and
deserialization in several formats. In
our case, only JSON and XML are
configured.
There are a few small changes to the
return types in the API, as well as to
error handling. Now all errors are
returned as JSON messages made up of a
mapping containing the key
'error_message' and the text of the
error. This will later be enhanced to
include XML support for XML requests.
This change also moves the script for
starting the V1 API to a new name and
replaces it with a script that starts
the V2 API. There is an open
bug/blueprint to fix that so both
versions of the API are loaded.
blueprint api-server-pecan-wsme
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I1b99a16de68f902370a8999eca073c56f9f14865
Move all of the files for the v1 API together into a
single directory to make room for the v2 files.
blueprint api-server-pecan-wsme
Change-Id: Ic794581c677a0277924459ad8a34fd7daf2bc365
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
The only one left is now in libvirt for the compute driver. How to remove
this and rewrite this pollster is still under discussion.
This implements blueprint nova-flags-removal.
Change-Id: Ife54e402cb307b9b4cb360d8ee54683ac1e73e1c
Signed-off-by: Julien Danjou <julien@danjou.info>
Also change the collector from a manager into a Service
to make it easier to access the rpc connection.
Change-Id: I1d79abb1db087110d565a9673a48de0502ac2a2b
Initialze the configuration object before initializing
the middleware, and pass the resulting config in to
the middleware so it can get the configuration settings.
addresses bug #1071047
Change-Id: I2a487d2a2f2d3467e522868ac78dc4645bf7d643
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This program can be used to send counter manually.
Change-Id: I11a7b7b99cf9aea6b6885cdc4640b8c2da54a564
Signed-off-by: Julien Danjou <julien@danjou.info>
This is a bit more obvious than running the module.
I have basically just moved api/__main__.py into bin/ceilometer-api.
Change-Id: I50d614ea98b278563b576e0b3b9df03b391e2152
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This changeset is phase one of changing the pollster API to support
polling individual instance resources. In this change, the single
compute agent is divided into two separate daemons.
The compute agent, for polling instance data, is still meant to
run on the compute server. The new "central" agent, for polling
resources not tied to a compute node, is meant to run on a management
server (probably the same place the collector runs). The configuration
of the pollsters is updated so that they are loaded by the
appropriate agent.
New base classes are introduced for each of the types of pollsters.
For now, the APIs remain the same.
The code implementing the agent and plugins has been moved around
to reflect the new logical relationships, and the documentation
is updated (including new installation instructions).
Change-Id: Ica6e947b2e457f7db6672147af1369a24066037d
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
It seems some option handling within nova has changed, so we need
to update our use of the configuration object. These changes ensure
that the options we care about are registered before they are used.
Change-Id: I0dd34f620eed5f43af6da5b02f9c41d35287c275
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This changed since 00786bc554a2dfacb3c6f02fbb7e9c98f35d4262 for blueprint
cfg-global-object in Nova.
Change-Id: Iaae34a1e4953c964b99411247219f7b72358823f
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
bug 1004198
bug 1004200
- Set up the collector to receive the metering messages.
- Make the collector republish notifications as metering data.
- Add a "monitor" mode to tools/notificationclient.py to simply print
the events without writing them to a file.
- Add a --topic flag to tools/notificationclient.py so it can be made
to listen events other than notifications (for monitoring metering
events).
- Change "counter_datetime" within the metering message to "timestamp"
to be consistent with the notification message format.
- Add a configuration option to control the secret value for signing
metering messages.
- Make the collector and agent daemon control topics more specific.
- Use the config setting to set the metering topic subscription.
- Set a short interval for polling to get more data for development
testing.
- Log after successful load of pollsters instead of before attempt.
Change-Id: Iedfe26f8a4fa80d88cd0a76e5738001ba5689bdc
Move user_id and project_id into the Counter
since the polling code has to pull those
values from the instance object.
Convert the libvirt polling code to plugins.
Have the agent manager load the plugins and run
them as part of its periodic task step.
Change-Id: Id59a696beb33c7c9a232460ce52e272f5408e70d
Implement a Counter class for use by notification plugins.
Define a base class for Notification plugins.
Define a dispatcher class for notification events to be passed to the plugins.
Add a notification plugin for instance creation and "instance" counters.
Add a reusable function for turning a Counter into a metering event dictionary.
Change-Id: Iaa626b98e1a661ed31cc8b8e95263c111df20888
This script is used to grab notifications from existing hosts
Change-Id: I45826fd6941d7bd93464bf945903b6b41223745c
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>