mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #-: Cooldown period after shutdown a VM
This commit is contained in:
parent
a27bf1562f
commit
8f6ce0c025
@ -1120,13 +1120,21 @@ void LifeCycleManager::trigger_monitor_poweron(int vid)
|
||||
VirtualMachineTemplate quota_tmpl;
|
||||
string error;
|
||||
|
||||
time_t the_time = time(0);
|
||||
|
||||
// Prevent Monitor and VMM driver race condition.
|
||||
// Ignore state updates for 30s after state changes
|
||||
if ( the_time - vm->get_running_etime() < 30 )
|
||||
{
|
||||
vm->log("VMM", Log::INFO, "Ignoring VM state update");
|
||||
return;
|
||||
}
|
||||
|
||||
int uid = vm->get_uid();
|
||||
int gid = vm->get_gid();
|
||||
|
||||
vm->log("VMM",Log::INFO,"VM found again by the drivers");
|
||||
|
||||
time_t the_time = time(0);
|
||||
|
||||
vm->set_state(VirtualMachine::ACTIVE);
|
||||
|
||||
vm->set_state(VirtualMachine::RUNNING);
|
||||
|
Loading…
x
Reference in New Issue
Block a user