221 Commits

Author SHA1 Message Date
gord chung
a7253a8387 remove kafka and keystonemiddleware reqs
- no more api
- no more kafka publisher (use oslo.messaging)

Change-Id: I21794db25b624049df21d076ebe3be88fcd9d95a
2017-10-30 19:06:38 +00:00
Julien Danjou
7b959b33c5 Replace jsonutils by ujson
ujson is faster than jsonutils, and we do not need any fancy feature jsonutils
might offer.

This also has the benefit of removing a big dependency on Ceilometer.

Change-Id: I24bf08d0fa6ccc34beef0a0c34a47bf2fa266e3e
2017-10-26 09:35:14 +02:00
Julien Danjou
9323f07f97 Remove deprecated storage drivers
Change-Id: I6b262dd440a72f25662b64d938ab9e5328709a97
2017-10-26 09:35:14 +02:00
Julien Danjou
d881dd5228 Remove Ceilometer API
This removes the deprecated Ceilometer API.

Change-Id: I752b36b3dfe8f935b68c4d3d59ccb5b8b60c582f
2017-10-25 14:38:43 +02:00
Mehdi Abaakouk
75e10b2a48 High precision rate of change timedelta
The current way to calculate rate of change is not precise at all and
depends on the local host clock. So, we have good chance that the host
clock derive a bit between each polling. Also the timestamp is polling
cycle run and not the exact polled sample.

This makes the rate of change transformer not accurate, and maybe wrong
if the local clock have jumped to much or if a pollster make to much
time to get the stats (libvirt reconnection, ...).

A sample gets a new attribute monotonic_time, where we can store an
accurate polling time using monotonic.monotonic().

In rate of change transformer, if the monotonic time is available we use
to calculate the time delta between samples.

For instance metrics, we set monotonic_time as soon as we poll it from
libvirt, avoiding almost all precision issue.

That makes the rate of change precise to the nanoseconds for polled
samples, while keeping the timestamp identical for all samples polled
during one cycle.

Related-bug: #1527620
Change-Id: I40e14fb6aa595a86df9767be5758f52b7ceafc8f
2017-07-20 16:45:20 +02:00
Huan Xie
f2279a6222 XenAPI: use os-xenapi for XenAPI driver
os-xenapi contains all XenServer dom0 plugins and provide utility
tools for communicating to XenServer dom0 plugins, currently both
nova and neutron projects are using os-xenapi. This patch is to
change ceilometer to use os-xenapi too.

Change-Id: I14819fd57305edb0f4337af88e56ed6b980d7da8
2017-05-10 18:19:59 -07:00
alextricity25
66a77bb64a Remove upper constraint on sqlalchemy
To comply with the upper-constraints defined in OpenStack
Requirements, the upper constraint for sqlalchemy has been
removed

Change-Id: Icb48c61b9022216a9593cdf20bb6166cb742fe56
Closes-Bug: #1687641
2017-05-02 10:04:42 -05:00
Jenkins
1a61747f87 Merge "Use HostAddressOpt for opts that accept IP and hostnames" 2017-03-23 19:24:42 +00:00
blue55
3b450c65dd Use HostAddressOpt for opts that accept IP and hostnames
Some configuration options were accepting both IP addresses
and hostnames. Since there was no specific OSLO opt type to
support this, we were using "StrOpt". The change [1] that added
support for "HostAddressOpt" type was merged in Ocata and became
available for use with oslo version 3.22.

This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.

[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb

Change-Id: I2463fc873bb149cafa802f5743d5f482f25552fc
2017-03-23 14:42:54 +08:00
Jenkins
935e5f3112 Merge "coordination: create coordinator at init time" 2017-03-20 16:43:33 +00:00
Eric Berglund
3d965eee45 Remove second tenacity in requirements
tenacity is defined twice in requirements.txt for ceilometer. This
removes the definition with the lower requirement.

Change-Id: I9c94c4950e81223a73e0514e03697cdca562c28d
Closes-Bug: #1673798
2017-03-17 14:52:03 +00:00
Julien Danjou
5e43dc7733 coordination: create coordinator at init time
This also switches the coordination to zake:// in test so the code actually
works like it would with a production-ready coordinator.

Change-Id: I38f6a3389f70bed6b45fa7526a13d0484bfc9c3f
2017-03-17 11:24:29 +01:00
Mehdi Abaakouk
66179f89a0 libvirt: rewrite the error handling
Error handling of libvirt driver work 'sometimes'.
Some error are catched only with we lookup for a instance
uuid, but not for other libvirt operation.

This change rewrites the logic to catch libvirt error on
each inpector method. This ensures we catch all errors whatever
which libvirt method raises it.

We also leverage tenacity instead of the custom retry code.

Change-Id: Idd54c18ece42c2dce3baf82626d30d5c2e5a49d6
2017-03-16 17:54:25 +01:00
Darren Hague
01ce7ff89e Bump kafka-python and oslo.messaging
kafka-python is bumped to 1.3.2 in order to support Kafka 0.10.x
oslo.messaging is bumped to 5.12.0 in order to support kafka-python (there is
a changed parameter name that causes a stacktrace otherwise)

Change-Id: I630b999a050d7186d8c5fb38a24034a7f063c24b
2017-03-10 14:47:29 +00:00
gord chung
b530fc3ec8 use tooz hashring
tooz provides hashring functionality so let's avoid duplicating it
since we already use tooz

Change-Id: Id40e4836c5690d252ba0830f6173587f8d5d470c
2017-03-03 19:04:31 +00:00
Mehdi Abaakouk
b692d3a6a6 Don't poll nova with compute agent
This change introduces a new method to get instances
metadata on the ceilometer-compute-agent.

This switches devstack/gate to libvirt_metadata for gnocchi

Change-Id: Ice1918659be49589a45d7a406044adc0a187aa27
2017-01-09 15:41:37 +00:00
Alfredo Moralejo
cf92a7a9d5 Bump minimal version of cotyledon
https://review.openstack.org/#/c/387193/ introduced import of
cotyledon.oslo_config_glue wich was introduced in release 1.3.0, so
we should require at least this version.

Change-Id: Icd8cd0e36266d824f3a0233106781739f7c36f4b
2016-12-01 13:53:53 +01:00
gord chung
380bb26dbb Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project. Tenacity is a fork of retrying, but has improved the
interface and extensibility (see [1] for more details). Our end
goal here is removing the retrying package from our requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- tenacity uses seconds rather than ms as retrying did.
- tenacity has different kwargs for the decorator and
Retrying class itself.
- tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- tenacity defines 'time.sleep' as a default value for a kwarg.
That said consumers who need to mock patch time.sleep
need to account for this via mocking of time.sleep before
tenacity is imported.

This patch updates all usages of retrying with tenacity.
Unit tests will be added where applicable.

Note: This change is not newton critical so projects are welcome
to hold off on committing until post-newton. Ideally this change
will merge by the first part of Ocata so dependant functionality
can land and have time to solidify for Ocata.

[1] https://github.com/jd/tenacity

Closes-Bug: #1635394
Change-Id: I0ad7deee3f17f6626708369371167184a40e6368
2016-11-17 10:53:49 +00:00
liusheng
b7344dd6c8 Add support of metering volume related resources
This change add the support of metering size of volume/snapshot/backup.

Blueprint add-support-of-metering-volume-related-resources
Change-Id: I9c6ec1e79c267255e7839d70324726e56bc6d768
2016-11-10 09:16:54 +08:00
celik.esra
e0a28535b9 Replace SimpleProducer with KafkaProducer
SimpleProducer is marked as deprecated at kafka-python library [1].
The deprecated method causes "FailedPayloadsError: FailedPayloadsError" error.
This patch replaces SimpleProducer with KafkaProducer.

[1] http://kafka-python.readthedocs.io/en/1.1.1/simple.html

Change-Id: I7c979e1064c9c42e82ae71e2631a3d2bd0462839
Closes-bug: #1628456
2016-11-07 11:18:27 +03:00
zhangshengping2012
2c7f5e159f Change redirect status from 307 to 308
webob start to support 308 at version 1.5.0

"HTTP Status Code 308 is now supported as a Permanent Redirect"

Change-Id: I27eef9585e88ef4e75678b9c7530bca230c3b42b
2016-10-26 18:42:14 +08:00
Lianhao Lu
f68edc7fd3 Fixed cotyledon version requirement
There is a minimum version requirement of cotyledon for
ceilometer-collector to work properly. We need to make sure it's above
version 1.2.4.

Change-Id: I07276d032f7f8849501f94f9577833c1d9b68131
Closes-Bug: #1632925
2016-10-13 11:33:25 +08:00
Julien Danjou
fae8caee14 Move oslo.db to hard requirements list
The options from oslo.db are also used by other storage drivers such as
MongoDB, which makes it mandatory even for this backend.

Change-Id: I3b09cffca1285ff92c0c7492b5b48c6a560251e5
Closes-Bug: #1624692
2016-09-18 19:11:43 +02:00
Jenkins
1a53514b26 Merge "Use deps extra for optional requirements" 2016-09-15 14:18:16 +00:00
Julien Danjou
2d09bce4da Use pbr wsgi_scripts feature to build ceilometer-api
Change-Id: I8812ea1a92d6dc7f41a490e971bb7a09dee9b304
2016-09-14 16:54:50 +02:00
Mehdi Abaakouk
3e013ff8f4 Use deps extra for optional requirements
Related-Bug: #1621384
Change-Id: I227c121b69ac1f51ed922e0b11bec005928aacab
2016-09-14 10:04:46 +02:00
Mehdi Abaakouk
80bc124511 move out oslo.service
This change replaces oslo.service by cotyledon.

Change-Id: I6eea5fcd26ade07fbcb5718b4285b7fa039a3b08
2016-07-13 08:54:12 +02:00
liusheng
0cf728a745 Fix the py34 jenkins job
The oslo.messaging<5.2.0(the v5.2.0 update change is in review[1])
depends on amqp>=1.4.0, in amqp-2.0 and amqp2.0.1, there is an issue[2]
that lead the amqp cannot be correctly installed in py34
environment(the depent package vine-1.1.0 of amqp won't bee installed),
that has borken the ceilometer py34 job[3]. we can wait the change[1]
merged and then bump the oslo.message version to avoid this issue. Because
Ceilometer don't participate the global-requirements, so we bump the
oslo.messaging to 5.2.0.

[1] https://review.openstack.org/#/c/324023/
[2] https://github.com/celery/py-amqp/issues/91
[3] http://logs.openstack.org/41/323641/4/check/gate-ceilometer-python34/cf3f043/console.html

Change-Id: Icb34a7f0e03662868aa0ce6e060c5e951711b79e
2016-06-02 12:38:58 +08:00
OpenStack Proposal Bot
6f9346a223 Updated from global requirements
Change-Id: I3687ac696bd830107a91f0dab35a26652d220ff2
2016-04-28 16:10:21 +00:00
ZhiQiang Fan
e4f19c0013 add debtcollector to requirements
We directly use debtcollector, hence it should be in requirements.txt

Change-Id: Id2efd6acedc335e62d4024fdf573fb6b38f826b4
2016-04-22 11:44:16 +08:00
Jenkins
47b7b7720e Merge "notification: Remove eventlet timers" 2016-04-21 18:52:36 +00:00
Mehdi Abaakouk
24f75dae12 notification: Remove eventlet timers
This change removes usage of eventlet timers.

This allows coordinator heartbeat/watchers to work correctly when
the main thread is stuck for any reason (IO, time.sleep, ...).

Change-Id: I847aebb0d0166c2b46505061a15a06e3ce1b5eb2
Closes-Bug: #1566887
2016-04-20 15:33:16 +02:00
OpenStack Proposal Bot
0b65c21337 Updated from global requirements
Change-Id: If1ea74d33bf9987c82ce7b263af1e4bef767fd9d
2016-04-19 12:22:24 +00:00
Jenkins
57f7102f55 Merge "remove python-ceilometerclient from requirements" 2016-04-18 09:24:57 +00:00
ZhiQiang Fan
b26c1e1b3b remove python-ceilometerclient from requirements
python-ceilometerclient is requried in previous alarming service,
since alarming code is removed, we don't directly use it any more.

Change-Id: Icfccd591d650e20cf62c6d37706681a43e3ff559
2016-04-18 19:03:58 +08:00
OpenStack Proposal Bot
5e318072ca Updated from global requirements
Change-Id: Iff1ddf05c7115c7c0972a705bddeabb52b5f8a58
2016-04-18 04:20:50 +00:00
OpenStack Proposal Bot
123fa26585 Updated from global requirements
Change-Id: Id18aaa8f0363723719bf7f2b3fb6b1ba651ea5c2
2016-04-08 15:43:59 +00:00
Julien Danjou
2e3f7920ab messaging: remove RequestContextSerializer
We don't pass any oslo.context object around anymore, we just pass dict
if we really need to send some context information – which we barely
need actually.

And remove oslo.context!

Change-Id: I17d15c043b5c7d508af9a43f50511817f9e81151
2016-04-06 15:53:42 +02:00
OpenStack Proposal Bot
e6005df321 Updated from global requirements
Change-Id: I4e80e68cbc9e885006d82c2901dca95ed1dd2990
2016-04-05 13:35:46 +00:00
OpenStack Proposal Bot
7a144db2cc Updated from global requirements
Change-Id: I7ccc6eec3a7845a9078c0caa6926cc87f989b58f
2016-03-05 15:30:54 +00:00
OpenStack Proposal Bot
7942f0bdb8 Updated from global requirements
Change-Id: Ic4ae47680ed0283cdd5131540d1527f35994e5c6
2016-02-27 02:42:17 +00:00
OpenStack Proposal Bot
95b2615d6e Updated from global requirements
Change-Id: I0ce5cc1283efdd274af2356fadf6d64918f1dcd5
2016-02-24 08:30:46 +00:00
Julien Danjou
4d06765f31 Remove unused pytz requirement
Change-Id: I84229b45831a177a26e90de8b55081cb86db19b0
2016-02-02 18:55:03 +01:00
OpenStack Proposal Bot
ce9e2178b0 Updated from global requirements
Change-Id: Icd76afd8a5e2206b6b552f43a20099a57c3f144f
2016-02-01 15:01:42 +00:00
OpenStack Proposal Bot
6b0d8dd30b Updated from global requirements
Change-Id: Id5f2d177dfda418ee8d7cee83fdc317cd65cd76a
2016-01-23 10:29:33 +00:00
OpenStack Proposal Bot
2b6e7e45e7 Updated from global requirements
Change-Id: I6d5e9fca5ec8f72c78b3ca6a2527e32f27652608
2016-01-21 17:41:01 +00:00
OpenStack Proposal Bot
8de1b78e73 Updated from global requirements
Change-Id: I595defd4531485f5cb4fa6ebf35abbf01b338970
2016-01-18 22:39:43 +00:00
OpenStack Proposal Bot
244b632581 Updated from global requirements
Change-Id: I7eb2209da999017ad170ee52cf79f59b746438c2
2016-01-09 04:53:23 +00:00
OpenStack Proposal Bot
f6f1983041 Updated from global requirements
Change-Id: I069c8a6e66794b07444d5a728831a0a708859965
2016-01-05 10:25:14 +00:00
OpenStack Proposal Bot
05754cafe7 Updated from global requirements
Change-Id: Ia3bdbd15adedc63b7dfb78c3a834504fc316674b
2015-12-15 21:23:36 +00:00