Liron Aravot has posted comments on this change.
Change subject: core: Added lock to VM when hot plugging/unplugging disks
(#844440)
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
Line 35: }
Line 36:
Line 37: @Override
Line 38: protected boolean canDoAction() {
Line 39: disk = getDiskDao().get(getParameters().getDiskId());
Do we should call the acquireLockInternal() explicitly from here. isn't it
called by CommandBase before performing canDoAction?
furthermore, if we do need to call it explicitly i guess that it should be the
first call on the return so all the other checks will be performed after the vm
is locked.
Line 40: return isVmExist() && isVmUpOrDown() && isDiskExist(disk) &&
checkCanPerformPlugUnPlugDisk()
Line 41: && acquireLockInternal();
Line 42: }
Line 43:
--
To view, visit http://gerrit.ovirt.org/7805
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic6ec6996b265851c7c691e1a4e68cba246df322a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches