Liron Ar has posted comments on this change. Change subject: core: LSM - lock changes, added support for disk snapshot scenarios ......................................................................
Patch Set 5: (6 comments) .................................................... Commit Message Line 9: This patch contains the following changes: Line 10: *When live migrating a disk, the disk (and it's snapshots) would be Line 11: locked for the whole flow preventing other operations to be done on the Line 12: disk. Therefore the create snapshot command will ignore those disks in Line 13: it's checks and they won't be unlocked as the snapshot phase ends. Done Line 14: Line 15: *Disk can be live migrated when snapshots of it are attached to other Line 16: vms unless those vms are not in "Down" status as it means that the disk Line 17: is being used by them. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveDisksCommand.java Line 170: moveDiskParameters.getSourceDomainId(), Line 171: moveDiskParameters.getStorageDomainId(), Line 172: vmId, Line 173: moveDiskParameters.getQuotaId()); Line 174: toReturn.setImageGroupID(diskMap.get(moveDiskParameters.getImageId()).getId()); Done Line 175: return toReturn; Line 176: } Line 177: Line 178: private LiveMigrateVmDisksParameters createLiveMigrateVmDisksParameters(List<MoveDiskParameters> moveDiskParamsList, Guid vmId) { .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java Line 185: return AuditLogType.UNASSIGNED; Line 186: } Line 187: Line 188: @Override Line 189: protected Map<String, Pair<String, String>> getExclusiveLocks() { As discussed f2f, it's unneeded as the disks are already locked in the db. the memory lock is already taken by LiveMigrateVmDisks (limitation of the infra forces us to acquire always both shared and exclusive locks) Line 190: return null; Line 191: } .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveSnapshotTaskHandler.java Line 23: Line 24: public class LiveSnapshotTaskHandler implements SPMAsyncTaskHandler { Line 25: Line 26: private final TaskHandlerCommand<? extends LiveMigrateVmDisksParameters> enclosingCommand; Line 27: private LinkedHashSet<Guid> movedVmDiskIds = null; Done Line 28: Line 29: public LiveSnapshotTaskHandler(TaskHandlerCommand<? extends LiveMigrateVmDisksParameters> enclosingCommand) { Line 30: this.enclosingCommand = enclosingCommand; Line 31: } .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskImagesValidatorTest.java Line 75 Line 76 Line 77 Line 78 Line 79 Done .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ImagesActionsParametersBase.java Line 99: public void setImportEntity(boolean importEntity) { Line 100: this.importEntity = importEntity; Line 101: } Line 102: Line 103: public boolean isShouldLeaveLocked() { Done Line 104: return shouldLeaveLocked; Line 105: } Line 106: Line 107: public void setShouldLeaveLocked(boolean shouldLeaveLocked) { -- To view, visit http://gerrit.ovirt.org/20847 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c7cb49ff37f28d0b3ab0df9f4ee1f3082aba018 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches