Skip to content

Commit 4764133

Browse files
committed
B #6772: Additional fix Host NUMA nodes after VM migration
Signed-off-by: Kristian Feldsam <[email protected]>
1 parent 305b33e commit 4764133

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/lcm/LifeCycleActions.cc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,6 @@ void LifeCycleManager::trigger_migrate(int vid, const RequestAttributes& ra,
348348

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

351-
if ( vm->get_hid() != vm->get_previous_hid() )
352-
{
353-
hpool->del_capacity(vm->get_previous_hid(), sr);
354-
355-
vm->release_previous_vnc_port();
356-
}
357-
358351
vm->set_stime(the_time);
359352

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

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

361+
if ( vm->get_hid() != vm->get_previous_hid() )
362+
{
363+
Template tmpl;
364+
vm->get_previous_capacity(sr, tmpl);
365+
366+
hpool->del_capacity(vm->get_previous_hid(), sr);
367+
368+
vm->release_previous_vnc_port();
369+
}
370+
371+
vmpool->update(vm.get());
372+
368373
//----------------------------------------------------
369374

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

10421048
time_t the_time = time(0);
10431049

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

1258+
vm->get_previous_capacity(sr, tmpl);
12521259
hpool->del_capacity(vm->get_previous_hid(), sr);
12531260

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

1282+
vm->get_previous_capacity(sr, tmpl);
12751283
hpool->del_capacity(vm->get_previous_hid(), sr);
12761284

12771285
vmpool->update_previous_history(vm);

src/lcm/LifeCycleStates.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ void LifeCycleManager::trigger_deploy_success(int vid)
298298

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

301-
vm->get_capacity(sr);
301+
Template tmpl;
302+
vm->get_previous_capacity(sr, tmpl);
302303

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

0 commit comments

Comments
 (0)