1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Recover removed check inn VirtualMachineManager monitor

This commit is contained in:
Ruben S. Montero 2013-11-03 13:15:09 +01:00
parent 9f9057dd79
commit 666cbd697b

View File

@ -1456,7 +1456,8 @@ error_common:
void VirtualMachineManager::timer_action()
{
static int mark = 0;
static int mark = 0;
static int timer_start = time(0);
VirtualMachine * vm;
vector<int> oids;
@ -1482,6 +1483,13 @@ void VirtualMachineManager::timer_action()
// Clear the expired monitoring records
vmpool->clean_expired_monitoring();
// Skip monitoring the first poll_period to allow the Host monitoring to
// gather the VM info
if ( timer_start + poll_period > thetime )
{
return;
}
// Monitor only VMs that hasn't been monitored for 'poll_period' seconds.
rc = vmpool->get_running(oids, vm_limit, thetime - poll_period);