These are detected as errors since the clean up was done[1] in
the requirements repository. Minimum versions are bumped to avoid
installing these known bad versions.
[1] 314734e938f107cbd5ebcc7af4d9167c11347406
Also remove the note about old pip's behavior because resolver in
recent pip does not require specific order.
Change-Id: I04335dd0d06b5c65b805fbb1e0fc0cd1c10a79fb
The zake driver in tooz was deprecated[1] because the zake library has
been archived[2].
[1] 9acbc5391521155b04aa6654fb91c90b467b5750
[2] https://github.com/yahoo/Zake
Change-Id: I1b040e0643968fec1d41f562ca0b264a311ef6c5
This removes the monasca integration. Monasca was recently
declared as inactive project. In addition the monasca related
unit tests were very verbose and they were outputing a lot
of errors. Lately one of the unittests even started failing
randomly.
Change-Id: I468079b2a790245bd682c80d0116fb0da60d0e7c
Problem description
===================
The dynamic pollsters only support APIs that produce
JSON responses. Therefore the dynamic pollsters do not
support APIs where the response is an XML or not Restful
compliant APIs with HTTP 200 within a plain text message
on errors.
Proposal
========
To allow the dynamic pollsters to support other APIs
response formats, we propose to add a response handling
that supports multiple response types. It must be
configurable in the dynamic pollsters YAML. The default
continues to be JSON.
Change-Id: I4886cefe06eccac2dc24adbc2fad2166bcbfdd2c
... and discovery/inspector plugins depending on the pollster. These
were implemented to gather metrics via SNMP daemon in TripleO-managed
deployment but these are no longer valid since Telemetry services and
Nova were removed from undercloud.
Change-Id: If9a6b695ba799c766314a88328ea8a779407acc0
monotonic dependency was removed when switching to python3. The
requires on it is not needed. It was previously limited to python < 3.3
but that limit got lost. There is no current usage in the code
importing monotonic.
https: //review.opendev.org/c/openstack/ceilometer/+/676706
Change-Id: I182dd641893eea7226a5e3afc17132ac973b516b
This change removes the Xen support which was deprecared during
the previous cycle[1].
[1] fd0a561bea956f1b62f6ca5a27e762cb76ad9a90
Change-Id: If1675468095cbc1b9c065edb6b086e7f4afa2f3e
It was discovered a problem on a production setup of Ceilometer compute
with metrics stopping to be gathered. While troubleshooting, we found
the following error message.
```
ERROR ceilometer.polling.manager [-] Prevent pollster cpu from polling
```
That error message happened after the following message:
```
WARNING ceilometer.compute.pollsters [-] Cannot inspect data of
CPUPollster for <UUID>, non-fatal reason: Failed to inspect instance
<UUID> stats, can not get info from libvirt: Unable to read from
monitor: Connection reset by peer: NoDataException: Failed to inspect
instance <UUID> stats, can not get info from libvirt: Unable to read
from monitor: Connection reset by peer
```
The instance was running just fine in the host. It seems a concurrency
issue with some other process that made the instance locked/unavailable
to ceilometer computer pollsters. Ceilometer was unable to connect to
Libvirt (after 2 retries), and the code is designed to prevent
Ceilometer from continuing trying. Therefore, the "CPU" metric pollster
was put in permanent error. To fix the issue, We needed to restart
Ceilometer in the affected hosts. However, until we discovered this
issue, we lost the amount 3 days of data.
```
@libvirt_utils.raise_nodata_if_unsupported
@libvirt_utils.retry_on_disconnect
def inspect_instance(self, instance, duration=None):
domain = self._get_domain_not_shut_off_or_raise(instance)
```
It will try to retrieve the domain (VM) object (XML description) via
libvirt. If it fails, it will retry via
`@libvirt_utils.retry_on_disconnect`; if that fails, it marks the
metric in permanent error with the annotation:
`@libvirt_utils.raise_nodata_if_unsupported`.
Other metrics continued working. Therefore, I investigated a bit
deeper, and the problem seems to be here:
```
retry_on_disconnect = tenacity.retry(
retry=tenacity.retry_if_exception(is_disconnection_exception),
stop=tenacity.stop_after_attempt(2))
```
The `retry_on_disconnect` annotation is not configuring the "tenacity"
retry library wait. The default is "no wait". Therefore, the retries
have a bigger chance of being affected by very minor instabilities
(microseconds connection issues can generate a problem with this
configuration). One alternative to avoid such problems in the future
is to use a wait configuration such as the one being proposed. Then,
ceilometer computer pollsters would wait/sleep before retrying, which
would provide some time for the system to be available for the compute
pollsters.
In this proposal, we would wait 2^x * 3 seconds between each retry
starting with 1 second, then up to 60 seconds.
Change-Id: I9a2d46f870dc2d2791a7763177773dc0cf8aed9d
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).
Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.
Story: #2007865
Task: #40223
Change-Id: I1f8577e560fd3ffad0c3b6edfc4c74dddedfa719
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore
Change-Id: I93294c42a967ca19b9b04ead9cd636b52f1cc038
The Ceilosca (monasca-ceilometer) publisher has been around since
before the Mitaka release and has been used in production for years.
The MonascaPublisher acts as another Ceilometer publisher and sends
selected metrics on to the Monasca API for storage, aggregation,
alarming, etc. Once metrics are in Monasca, they may be retrieved
through the Monasca API or with the python-monascaclient. This
Ceilosca functionality is a key component for metering in several
distributions and is used in many customer installations.
With the removal of the Ceilometer v2 API (which allowed the
removal of the Ceilosca storage driver, shrinking the Ceilosca
code base) and continuing changes to Ceilometer, a tighter
integration with the ceilometer repo may be beneficial to keep
both Monasca and Telemetry in sync.
Change-Id: I2cbce160503e23dfbde375722a3bd100ec86494e
Story: 2001239
Task: 5769
monotonic is a backport of time.monotonic from python3. Only install it
for python2.
Depends-On: https://review.openstack.org/615441
Change-Id: Id27cd748e883d54dd93dac2e6bd8caee6728f7e1
This commit adds the functionality of ceilometer-status CLI for performing
upgrade checks as part of the Stein cycle upgrade-checkers goal.
It only includes a sample check which must be replaced by real checks in
future.
Change-Id: I6e76b74b2f02251ee39025e02de44b13568ebed2
Story: 2003657
Task: 27732
With oslo.messaging 9.0.0 the ceilometer tests are failing. A fix [1]
in oslo.messaging already proposed and merged, but a release is needed
for the ceilometer tests to pass.
[1] https://review.openstack.org/#/c/608196/
Change-Id: Ia90e4fb28c42467a9090d53742b5acc9d4841aaa
msgpack-python got renamed to msgpack (see
https://pypi.python.org/pypi/msgpack-python/0.5.1) and msgpack-python
is deprecated now.
This is important because other requirements already switched to
msgpack (eg. oslo.serialization) and installing both in parallel is
not possible for Distros.
Change-Id: I603eadbc2a5e1705375050920d5f1631c51a5a02
Closes-Bug: #1743445
ujson has not had any active maintenance for the last 12 months;
switch to using json module instead.
Change-Id: I39027b534e94b3f877d881647a7c843183f60f92
Closes-Bug: 1737989
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
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
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
To comply with the upper-constraints defined in OpenStack
Requirements, the upper constraint for sqlalchemy has been
removed
Change-Id: Icb48c61b9022216a9593cdf20bb6166cb742fe56
Closes-Bug: #1687641
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
tenacity is defined twice in requirements.txt for ceilometer. This
removes the definition with the lower requirement.
Change-Id: I9c94c4950e81223a73e0514e03697cdca562c28d
Closes-Bug: #1673798
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
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
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