mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #2831: Do not add monitoring data to the VM when it is not ACTIVE
This commit is contained in:
1 parent
ee3a9a8ed9
commit
3d6f52baaa
1 file changed
+7
-2
@@ -617,6 +617,11 @@ void VirtualMachineManagerDriver::process_poll(
|
||||
/* Parse VM info and update VM */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
if (vm->get_state() != VirtualMachine::ACTIVE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rc = parse_vm_info(monitor_str, cpu, memory, net_tx, net_rx, state, custom);
|
||||
|
||||
if (rc == -1)
|
||||
@@ -649,8 +654,8 @@ void VirtualMachineManagerDriver::process_poll(
|
||||
/* Process the VM state from the monitoring info */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
if (state == '-' || ( vm->get_lcm_state() != VirtualMachine::RUNNING &&
|
||||
vm->get_lcm_state() != VirtualMachine::UNKNOWN))
|
||||
if (vm->get_lcm_state() != VirtualMachine::RUNNING &&
|
||||
vm->get_lcm_state() != VirtualMachine::UNKNOWN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user