Change in ovirt-engine[master]: core: block VM migration during live storage migration

ofrenkel at redhat.com ofrenkel at redhat.com
Thu Apr 25 06:43:40 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: core: block VM migration during live storage migration
......................................................................


core: block VM migration during live storage migration

This is a best-effort fix for preventing a VM from being migrated during
migration of one of its disks (live storage migration), and vice versa.

One way is already covered - live storage migration is made only when
the VM state is up or paused so it can't be executed when the VM is in
migration.

This patch is partial fix for the opposite way - a check is added to
MigrateVmCommand to verify that none of the VM's disks is locked, which
is the case when one of its disks is being migrated (or during snapshot
creation for the disk).

This fix doesn't cover a situation where the VM migration and storage
migration/snapshot creation are taking place simultanously, and not
cover the case where the VM migration fails thus being rerun and the VM
state is switched to 'UP' in the middle of the process.

Change-Id: Id630a01368290ba9ac6c71c5cab2095f84fa018b
Bug-Url: https://bugzilla.redhat.com/878131
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InternalMigrateVmCommand.java
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/MoveDisksCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java
5 files changed, 18 insertions(+), 15 deletions(-)

Approvals:
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Verified


--
To view, visit http://gerrit.ovirt.org/14122
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id630a01368290ba9ac6c71c5cab2095f84fa018b
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>



More information about the Engine-commits mailing list