1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-24 02:03:52 +03:00

Update last_poll for VMs

This commit is contained in:
Ruben S. Montero 2010-07-30 01:46:23 +02:00
parent ab24a66e0e
commit 6c70f33a27

View File

@ -302,11 +302,13 @@ void VirtualMachineManagerDriver::protocol(
if (result == "SUCCESS")
{
string deploy_id;
string deploy_id;
time_t thetime = time(0);
is >> deploy_id;
vm->update_info(deploy_id);
vm->set_last_poll(thetime);
vmpool->update(vm);
@ -320,7 +322,7 @@ void VirtualMachineManagerDriver::protocol(
os.str("");
os << "Error deploying virtual machine";
if (info[0] != '-')
os << ": " << info;
@ -525,7 +527,7 @@ void VirtualMachineManagerDriver::protocol(
vmpool->update(vm);
if (state != '-' &&
if (state != '-' &&
(vm->get_lcm_state() == VirtualMachine::RUNNING ||
vm->get_lcm_state() == VirtualMachine::UNKNOWN))
{
@ -546,7 +548,7 @@ void VirtualMachineManagerDriver::protocol(
if ( vm->get_lcm_state() == VirtualMachine::UNKNOWN)
{
vm->log("VMM",Log::INFO,"VM was now found, new state is"
" RUNNING");
" RUNNING");
vm->set_state(VirtualMachine::RUNNING);
vmpool->update(vm);
}