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
(cherry picked from commit fd6a76601a382cdf47527893f9255b48bc235d05)
If possible, calculate cputime from vcpu time + vcpu wait.
Fall back to cpu.time, if any vcpu.x.time or vcpu.x.wait
values are missing.
derived from I7bce33854dfe9c7b0e03b8c22721d04028183701
Co-Authored-By: Michael Ly <msly@us.ibm.com>
Co-Authored-By: Avi Weit <WEIT@il.ibm.com>
Co-Authored-By: Jorge Rodriguez <jorgedr@us.ibm.com>
Co-Authored-By: Karolyn Chambers <Karolyn.Chambers@target.com>
Co-Authored-By: Daniel Berrange <berrange@redhat.com>
Co-Authored-By: gordon chung <gord@live.ca>
Change-Id: I20700a32d608b3444b22c5ae460002eeb86d78ae
Closes-bug: #1677159
Closes-bug: #1421584
(cherry picked from commit a4ec0911a3)
deriving cpu_util from cputime is not exact as it relies on timing
of host and a completely independent timing of pollster. this can
cause precision issues with nanosecond timing resulting in >100%
calculations. this sets a cap so at most cpu_util can only report
100% cpu utilisation.
Change-Id: I80c099d8618833794ef19e9497cfad4db7912851
Closes-Bug: #1527620
(cherry picked from commit 41d940e369)
This is wrong use for decorator @property without set method.
For retry_on_disconnect method, when raise libvirt.libvirtError
may be invoke self.connection = None which will raise
"AttributeError: can't set attribute". Because the invoke class has
not method for connection which decorator @connection.setter:
@connection.setter
def connection(self, value):
self._connection = value
You can find how to use @property decorator over here:
https://docs.python.org/3/library/functions.html#property
Change-Id: I3d5f3e8182ddad30d7ed33607451b799eec8aaaa
we need auth_mode set in gnocchi3.1+ or else it won't use keystone
Change-Id: I3fb8173dd4637514c06f7fec6cd86aa42038120f
(cherry picked from commit b8960479ac)
gnocchi dispatcher will attempt to patch resource after pushing
measures. if we can't create resource, we shouldn't bother trying
to handle the patch later on. also, add better logging to figure
out which resource failed
Change-Id: Icfb2a694230d5c185a2726463657d3a11ed59fe0
(cherry picked from commit 54aea5b2d7)
- move cinder and keystone configuration instructions from admin
guide to install guide so we have all meter enabling steps in
same place.
- move heat and neutron config to install guide.
Change-Id: Ibc8096e3fb6c95886c3bddafb927600fe506415d
(cherry picked from commit 9105e194c7)
Since last oslo.config, an issue in our tests have showup.
We set a string on a MultiStrOpt, for example this results to have the
messaging driver looks like ["a", "e", "g", "i", "m", "n"] instead of
["messaging"]. I wonder how this have worked before...
This change fixes the drivers lists.
(cherry picked from commit 52f561c88e)
Change-Id: I973aa66f54b284fd87b1e48d43a2e459d760cbe3
The 404s are caused when Keystone has a tenant that Swift does not.
These 404s can safely be ignored.
If not ignored, some meters are not collected from Swift, as the
ClientException stops the tenant loop from completing.
Change-Id: I34aa40ba6c8e40e6d51b0a8dd24b8975c742f3ab
(cherry picked from commit 2ab761db26)
Closes-bug: #1681362
gnocchi+keystone should be setting keystone configurations under
keystone_authtoken for api authentication. service_credentials is
for accessing external services
Change-Id: I4dd837b3c5c4775b5d2c6d22097bf90884712b41
(cherry picked from commit 84e871fda8)
response_strings wants a list, not a string. In gabbi earlier than
1.33.0 it accept a string and then iterated checking for each single
character in the response body. So still passing.
This fixes recent failures by putting the necessary '-' at the start
of the search string. It's an easy bug to make and then never
notice, which is why gabbi 1.33.0 is all uptight about it.
Change-Id: I239a968e28a57ad4732f57c10eea7999f5d06349
(cherry picked from commit a868016635)
To not fall into https://review.openstack.org/#/c/428777
during ceilometer-upgrade we should require at least gnocchiclient 3.1.
Change-Id: I020a7d84b1732f8c2bebb0c5d633ec476432e248
(cherry picked from commit 2874c2af12)
we aren't blacklisting items properly because our NovaLike objects
can't be compared and therefore we can never detect if it has
been blacklisted previously.
Change-Id: I4177fe5f45b6b1fb328e88376c179e790f360adf
(cherry picked from commit 00a19698f5)
meters.yaml sets flavor_name and flavor_id under resource_metadata
instead of id and name under flavor key as polling does.
note: only pick flavor_id from original patch
Change-Id: I328ca62a203f47cf8d0e05049723b914f378acd2
(cherry picked from commit 7a0954eedf)
ceilometer needs gnocchi to be registered in keystone to work
Closes-Bug: #1665348
Change-Id: Ie1986861b7d6812a52951f89aa406e3e7bec87aa
(cherry picked from commit 8c6d8551bb)
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.
(cherry-pick from commit d46c28b30c)
Change-Id: If8985f511d434af0449992b2bc3540da9b3a0591
flavor_id, flavor_name, display_name and host are required... we need to
include them when we build sample from notification.
host does not exist in compute.instance.create.start messages because
(i assume) nova doesn't know which host to create on yet.
also, when multiple metrics missing same resource, only attempt to
create once.
Change-Id: Ia680ad23608f6712ebce619797e2968f8acc6310
(cherry picked from commit 48d9cb7793)
This change doesn't log error message when the instance in nova is
not an Ironic node deployed by Tripleo.
Change-Id: Ic915825e795291cd688cffe2b1e1263f325546f9
Closes-bug: #1658656
(cherry picked from commit d1b25ebbe9)
we use keystone in integration gate but never set OS_AUTH_TYPE.
gnocchi will not default to keystone if OS_AUTH_TYPE isn't set.
Change-Id: I5e006c1b47a68bbe6c2e966faf8c740c23dde1ac
(cherry picked from commit 83412c80cc)
The non-UUID resource id are getting to be unique per user, and since the user
creating the alarm (gabbi) and the user checking for resource existence (aodh)
are different, the string->UUID conversion gives different result.
Using an UUID instead of a string should fix that.
Change-Id: I89cb079325e327541a444559217015f38029a506
Now Ceilometer uses copy&paste tempest code and the gate issue
happened sometimes because the code refers tempest internal code
which is defined as unstable.
This patch makes Ceilomter use the stable library interfaces instead
for keeping the gate test stable.
Change-Id: I055d8482a9be5fc5d4cf2601a31573aec9e4bee6
add support for polling specific definition file.
this splits the existing polling specific options out of
pipeline.yaml as transformations only exists on notifcation agent
and polling interval/discovery only exists on polling agents.
backward compatibility is maintained so pipeline.yaml file from
previous releases can still be passed in as polling definition file.
Change-Id: I206566349f98d6b17336cd5ea36ceb1e304dd90c