Bug #2278: Reset cpu and memory monitorization to 0 when the VM exits the running state

(cherry picked from commit 3ece9dacdf)
This commit is contained in:
Carlos Martín authored and Ruben S. Montero committed 2013-11-15 13:32:52 +01:00
1 parent 7bcefc9008
commit 8099694f04
2 files changed
+37

No files matched your search

+3
View File
@@ -855,6 +855,9 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose, int& imag
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_etime(the_time);
+34
View File
@@ -47,6 +47,9 @@ void LifeCycleManager::save_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_previous_etime(the_time);
@@ -85,6 +88,9 @@ void LifeCycleManager::save_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_running_etime(the_time);
@@ -115,6 +121,9 @@ void LifeCycleManager::save_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_epilog_stime(the_time);
@@ -509,6 +518,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_epilog_stime(the_time);
@@ -519,6 +531,7 @@ void LifeCycleManager::shutdown_success_action(int vid)
vmpool->update_history(vm);
// TODO CARLOS
vm->log("LCM", Log::INFO, "New VM state is EPILOG");
//----------------------------------------------------
@@ -533,6 +546,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_running_etime(the_time);
@@ -559,6 +575,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_epilog_stime(the_time);
@@ -987,6 +1006,9 @@ void LifeCycleManager::cancel_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_reason(History::USER);
@@ -1013,6 +1035,9 @@ void LifeCycleManager::cancel_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_epilog_stime(the_time);
@@ -1037,6 +1062,9 @@ void LifeCycleManager::cancel_success_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_running_etime(the_time);
@@ -1172,6 +1200,9 @@ void LifeCycleManager::monitor_suspend_action(int vid)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_running_etime(the_time);
@@ -1255,6 +1286,9 @@ void LifeCycleManager::failure_action(VirtualMachine * vm)
vm->delete_snapshots();
map<string, string> empty;
vm->update_info(0, 0, -1, -1, empty);
vmpool->update(vm);
vm->set_etime(the_time);