Arik Hadas has posted comments on this change.
Change subject: core: lock VM for whole live disk migration process
......................................................................
Patch Set 2:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 1846: }
Line 1847:
Line 1848: /**
Line 1849: * If the command has more than one task handler, we can reach
the end action
Line 1850: * phase and in that phase execute the next task handler. in
that case, we
Done
Line 1851: * don't want to release the locks, so we ask whether we're not
in execute state.
Line 1852: */
Line 1853: private void freeLockEndAction() {
Line 1854: if (getActionState() != CommandActionState.EXECUTE) {
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java
Line 69: * Ugly hack, but it is needed as the endAction method in this
command is called only
Line 70: * once and in that case it executes the next task handler, so we
have no other option
Line 71: * but to release the lock right after executing the next task
handler, assuming it'll
Line 72: * take the VM lock by himself so we won't end up in a state where
the VM is not locked.
Line 73: */
I tried to do it - ok, let's say I pass the engine lock into the handler, how
will the handler invoke 'freeLock' ? sure, it can get the lock manager and
invoke 'releaseLock' but is it better than override the 'endAction' method
here? If you have another option, please propose it
Line 74: @Override
Line 75: public VdcReturnValueBase endAction() {
Line 76: VdcReturnValueBase vdcReturnValueBase = super.endAction();
Line 77: freeLock();
--
To view, visit http://gerrit.ovirt.org/18545
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I432e9230da697a1a67c5d40e926e16215c2583ef
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches