Added monitor (e.g. CPU) to monitor and collect data

This patch gives a monitor interface for users to add their own monitors to
monitor on compute nodes on the compute manager.

The compute manager loads the monitors and gets the metrics, and sends to
the scheduler for utilization based scheduling.
The patch also gives a sample to collect CPU utilization data by libvirt
driver. The patch brings a new API get_host_cpu_stats() in class
ComputeDriver, and libvirt has implemented that in the patch.
For other virt drivers, it has not been implemented yet (TODO).

This is part of the blueprint utilization-aware-scheduling and the
blueprint generic-host-state-for-scheduler.

Change-Id: I4cd4f972c5c1cf6242a77aaeb9514c8a0d4faa0d
This commit is contained in:
Shane Wang
2013-07-08 21:51:32 +08:00
parent 5662d8cf5d
commit ddc7a6acfa

View File

@@ -1400,6 +1400,10 @@ class ImageDownloadModuleConfigurationError(ImageDownloadModuleError):
msg_fmt = _("The module %(module)s is misconfigured: %(reason)s.")
class ResourceMonitorError(NovaException):
msg_fmt = _("Error when creating resource monitor: %(monitor)s")
class PciDeviceWrongAddressFormat(NovaException):
msg_fmt = _("The PCI address %(address)s has an incorrect format.")