diff --git a/src/im/InformationManagerDriver.cc b/src/im/InformationManagerDriver.cc index 01565c58ab..4f44fa4a78 100644 --- a/src/im/InformationManagerDriver.cc +++ b/src/im/InformationManagerDriver.cc @@ -47,13 +47,15 @@ void InformationManagerDriver::protocol( string action; //stores the action result string result; - //stores the action id of the asociated HOSR + //stores the action id of the associated HOST int id; ostringstream ess; Host * host; + set vm_ids; + // Parse the driver message if ( is.good() ) @@ -96,6 +98,8 @@ void InformationManagerDriver::protocol( goto error_host; } + vm_ids = host->get_running_vms(); + if (result != "SUCCESS") { goto error_driver_info; @@ -114,7 +118,6 @@ void InformationManagerDriver::protocol( VectorAttribute* vatt; vector vm_att; vector::iterator it; - set vm_ids; getline (is, hinfo64); @@ -144,8 +147,6 @@ void InformationManagerDriver::protocol( host->remove_template_attribute("VM"); - vm_ids = host->get_running_vms(); - host->touch(true); hpool->update(host); @@ -208,8 +209,14 @@ void InformationManagerDriver::protocol( return; error_driver_info: - ess << "Error monitoring host " << id << " : " << is.str(); - goto error_common_info; + ess << "Error monitoring host " << id << " : " << is.str(); + + for (set::iterator it = vm_ids.begin(); it != vm_ids.end(); it++) + { + VirtualMachineManagerDriver::process_poll(*it, "STATE=d"); + } + + goto error_common_info; error_common_info: NebulaLog::log("InM",Log::ERROR,ess);