Itamar Heim has submitted this change and it was merged.
Change subject: core: LSM - lock changes, added support for disk snapshot scenarios
......................................................................
core: LSM - lock changes, added support for disk snapshot scenarios
This patch contains the following changes:
*When live migrating a disk, the disk (and it's snapshots) would be
locked for the whole flow preventing other operations to be done on the
disk. Therefore the create snapshot command will ignore those disks in
its checks and they won't be unlocked as the snapshot phase ends.
*Disk can be live migrated when snapshots of it are attached to other
vms unless those vms are not in "Down" status as it means that the disk
is being used by them.
*When live migrating the disk (after creating the snapshot for the
migration) all the disk snapshots would be locked and not just the
active volume.
*Task Handlers should be able to use the compensation context of the
enclosing command.
Change-Id: I0c7cb49ff37f28d0b3ab0df9f4ee1f3082aba018
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1028768
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/BaseImagesCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
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/MoveDisksCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/CreateImagePlaceholderTaskHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDisksTaskHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveSnapshotTaskHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/VmReplicateDiskFinishTaskHandler.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/TaskHandlerCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskValidator.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommandTest.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskValidatorTest.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/CreateAllSnapshotsFromVmParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ImagesActionsParametersBase.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/LiveMigrateDiskParameters.java
19 files changed, 348 insertions(+), 79 deletions(-)
Approvals:
Itamar Heim: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/21804
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0c7cb49ff37f28d0b3ab0df9f4ee1f3082aba018
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server