aodh/ceilometer/compute/pollsters
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
..
__init__.py Merge Central and Compute agents to *polling agent* 2014-12-15 13:05:41 +03:00
cpu.py Merge Central and Compute agents to *polling agent* 2014-12-15 13:05:41 +03:00
disk.py Return a meaningful value or raise an excpetion for libvirt 2015-01-08 02:45:53 +08:00
instance.py Merge Central and Compute agents to *polling agent* 2014-12-15 13:05:41 +03:00
memory.py Return a meaningful value or raise an excpetion for libvirt 2015-01-08 02:45:53 +08:00
net.py Return a meaningful value or raise an excpetion for libvirt 2015-01-08 02:45:53 +08:00
util.py Switch to oslo.utils 2014-08-22 14:52:13 +02:00