File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,17 @@ void InformationManager::_host_system(unique_ptr<im_msg_t> msg)
331331
332332static void test_and_trigger (const string& state_str, VirtualMachine * vm)
333333{
334+ time_t the_time = time (0 );
335+
336+ // Prevent Monitor and VMM driver race condition.
337+ // Ignore state updates for 30s after state changes
338+ if ( the_time - vm->get_running_etime () < 30 ||
339+ the_time - vm->get_running_stime () < 30 )
340+ {
341+ vm->log (" VMM" , Log::INFO, " Ignoring VM state update" );
342+ return ;
343+ }
344+
334345 auto state = vm->get_state ();
335346 auto lcm_state = vm->get_lcm_state ();
336347 auto lcm = Nebula::instance ().get_lcm ();
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ void LifeCycleManager::trigger_deploy_success(int vid)
307307
308308 int uid = vm->get_uid ();
309309 int gid = vm->get_gid ();
310-
310+
311311 int plan_id = vm->plan_id ();
312312 int action_id = vm->action_id ();
313313
@@ -1242,14 +1242,6 @@ void LifeCycleManager::trigger_monitor_poweron(int vid)
12421242
12431243 time_t the_time = time (0 );
12441244
1245- // Prevent Monitor and VMM driver race condition.
1246- // Ignore state updates for 30s after state changes
1247- if ( the_time - vm->get_running_etime () < 30 )
1248- {
1249- vm->log (" VMM" , Log::INFO, " Ignoring VM state update" );
1250- return ;
1251- }
1252-
12531245 int uid = vm->get_uid ();
12541246 int gid = vm->get_gid ();
12551247
You can’t perform that action at this time.
0 commit comments