Skip to content

Commit

Permalink
B #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 <feldsam@gmail.com>
  • Loading branch information
feldsam committed Nov 4, 2024
1 parent 305b33e commit aabbba2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
23 changes: 16 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 @@ -1249,6 +1254,8 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose,
vm->set_previous_vm_info();
vm->set_previous_running_etime(the_time);

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

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

Template tmpl;
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 aabbba2

Please sign in to comment.