Skip to content

Commit

Permalink
B OpenNebula#6772: Additional fix Host NUMA nodes after VM migration
Browse files Browse the repository at this point in the history
Signed-off-by: Kristian Feldsam <[email protected]>
  • Loading branch information
feldsam committed Nov 4, 2024
1 parent 305b33e commit 4764133
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
22 changes: 15 additions & 7 deletions src/lcm/LifeCycleActions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,6 @@ void LifeCycleManager::trigger_migrate(int vid, const RequestAttributes& ra,

hpool->add_capacity(vm->get_hid(), sr);

if ( vm->get_hid() != vm->get_previous_hid() )
{
hpool->del_capacity(vm->get_previous_hid(), sr);

vm->release_previous_vnc_port();
}

vm->set_stime(the_time);

vm->set_prolog_stime(the_time);
Expand All @@ -365,6 +358,18 @@ void LifeCycleManager::trigger_migrate(int vid, const RequestAttributes& ra,

vmpool->update(vm.get());

if ( vm->get_hid() != vm->get_previous_hid() )
{
Template tmpl;
vm->get_previous_capacity(sr, tmpl);

hpool->del_capacity(vm->get_previous_hid(), sr);

vm->release_previous_vnc_port();
}

vmpool->update(vm.get());

//----------------------------------------------------

tm->trigger_prolog_migr(vm.get());
Expand Down Expand Up @@ -1038,6 +1043,7 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose,
int& image_id, int uid, int gid, int req_id, Template& quota_tmpl)
{
HostShareCapacity sr;
Template tmpl;

time_t the_time = time(0);

Expand Down Expand Up @@ -1249,6 +1255,7 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose,
vm->set_previous_vm_info();
vm->set_previous_running_etime(the_time);

vm->get_previous_capacity(sr, tmpl);
hpool->del_capacity(vm->get_previous_hid(), sr);

vmpool->update_previous_history(vm);
Expand All @@ -1272,6 +1279,7 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose,
vm->set_previous_vm_info();
vm->set_previous_running_etime(the_time);

vm->get_previous_capacity(sr, tmpl);
hpool->del_capacity(vm->get_previous_hid(), sr);

vmpool->update_previous_history(vm);
Expand Down
3 changes: 2 additions & 1 deletion src/lcm/LifeCycleStates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ void LifeCycleManager::trigger_deploy_success(int vid)

vmpool->update_previous_history(vm.get());

vm->get_capacity(sr);
Template tmpl;
vm->get_previous_capacity(sr, tmpl);

hpool->del_capacity(vm->get_previous_hid(), sr);

Expand Down

0 comments on commit 4764133

Please sign in to comment.