Bug #4593
Can't migrate VM after reschedule fom state UNKNOWN
Status: | Closed | Start date: | 06/22/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Core & System | |||
Target version: | - | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 5.0 |
Description
Hi,
The issue is because in the code path there is no function to close the previous history reason.
here is the patch that solves the issue by properly closing the previous history record on prolog success action:
diff --git a/src/lcm/LifeCycleStates.cc b/src/lcm/LifeCycleStates.cc index e05d2e7..16b85b7 100644 --- a/src/lcm/LifeCycleStates.cc +++ b/src/lcm/LifeCycleStates.cc @@ -682,10 +682,14 @@ void LifeCycleManager::prolog_success_action(int vid) vm->set_state(VirtualMachine::BOOT_MIGRATE); break; - case VirtualMachine::PROLOG: - case VirtualMachine::PROLOG_FAILURE: //recover success case VirtualMachine::PROLOG_MIGRATE_UNKNOWN: case VirtualMachine::PROLOG_MIGRATE_UNKNOWN_FAILURE: //recover success + vm->set_previous_reason(History::USER); + vm->set_previous_action(History::MIGRATE_ACTION); + vmpool->update_previous_history(vm); + + case VirtualMachine::PROLOG: + case VirtualMachine::PROLOG_FAILURE: //recover success action = VirtualMachineManager::DEPLOY; vm->set_state(VirtualMachine::BOOT); break;
I'll update with pull request @GitHub shortly.
Kind Regards,
Anton Todorov
Associated revisions
bug #4593: Moved history closing to the action, where the capacity is
removed from the host. FAILURE states does not need update
History
#1 Updated by Anton Todorov about 5 years ago
Here is the pull request on GitHub
https://github.com/OpenNebula/one/pull/104
Kind Regards,
Anton Todorov
#2 Updated by Anton Todorov about 5 years ago
Hi,
I can confirm that the latest master does not have the issue.
I think the issue could be closed
Kind Regards,
Anton Todorov
#3 Updated by Ruben S. Montero about 5 years ago
- Status changed from Pending to Closed
- Resolution set to fixed
Thanks