Itamar Heim has submitted this change and it was merged.
Change subject: core: unlock VM on failure to migrate it to server
......................................................................
core: unlock VM on failure to migrate it to server
Recently we changed the MigrateVmCommand to lock the VM for the whole
migration process. When the VM was migrated to server and the migration
failed, we didn't release that lock and the VM would remain locked.
The fact that the handling of failed migrations was spread over the code,
made it more error-prone - things that were added for regular migrations
could have been missing for migrations to server.
This patch extracts the code that should be executed when migration fails
to separate method, and this method is called when migrations to server
fail as well. In particular, the acquired lock is released and therefore
the bug that was previously described is solved.
Change-Id: I282a1fec8ed3f12a8377b2eca8deadc7985d2f66
Bug-Url:
https://bugzilla.redhat.com/1033932
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmToServerCommand.java
2 files changed, 18 insertions(+), 15 deletions(-)
Approvals:
Itamar Heim: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/21814
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I282a1fec8ed3f12a8377b2eca8deadc7985d2f66
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server