Change in ovirt-engine[ovirt-engine-3.3]: core: unlock VM on failure to migrate it to server

iheim at redhat.com iheim at redhat.com
Tue Dec 3 10:55:51 UTC 2013


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 at 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 at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list