aodh/ceilometer/compute
ZhiQiang Fan 98b43aad17 Return a meaningful value or raise an excpetion for libvirt
Currently, there are some cases libvirt cannot inspect instance's memory
usage, and it is a normal behavior so libvirt just logs messages and
returns None. However, memory pollster doesn't check return value, so
AttributeError will be raised in such case, which leading to unnecessary
exception log messages in every cycle and for each instance, this will
bother cloud operator.

This patch uses virt.inspector exceptions for libvirt, so when there is no
valid value can be returned, we raise an exception, pollsters can catch
those exceptions and log proper messages. Since all of them are non-fatal
exception, log level is set to warn, which is excatly same as previous.

Note, this patch refactors some code of libvirt to suit this change.

Change-Id: I2c94aab90e827c75a602403d3c64fd6f67f73007
Closes-Bug: #1393415
2015-01-08 02:45:53 +08:00
..
notifications Move central agent code to the polling agent module 2014-12-12 20:55:15 +03:00
pollsters Return a meaningful value or raise an excpetion for libvirt 2015-01-08 02:45:53 +08:00
virt Return a meaningful value or raise an excpetion for libvirt 2015-01-08 02:45:53 +08:00
__init__.py Remove disabled_compute_pollsters option 2013-06-12 16:09:56 +02:00
discovery.py Move central agent code to the polling agent module 2014-12-12 20:55:15 +03:00
nova_notifier.py Port to graduated library oslo.i18n 2014-12-09 01:11:24 +08:00
util.py basestring replaced with six.string_types 2014-07-25 14:55:34 +04:00