98b43aad17
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 |
||
---|---|---|
.. | ||
__init__.py | ||
cpu.py | ||
disk.py | ||
instance.py | ||
memory.py | ||
net.py | ||
util.py |