Change in ovirt-engine[master]: core: Prevent StopVm to interleave with other VM locked actions

Roy Golan has submitted this change and it was merged. Change subject: core: Prevent StopVm to interleave with other VM locked actions ...................................................................... core: Prevent StopVm to interleave with other VM locked actions Stop and Shutdown VM commands are calling the DestoryVds command which is contending on the VdsManager lock. The lock is implemented as synchronized (object) - this means that order isn't kept and we're subjected to JVM's scheduling descisions so other commands, like RunVm can take the lock and result the Vm to stop instead of start Fix: take an exclusive engine lock on Stop and Shutdown commands This will also prevent a situation where asyncRunningVms has an entry although the VM is down. Change-Id: I6109ef0ea4869b59a93be6fef4b0c3cff50da62e Signed-off-by: Roy Golan <rgolan@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ShutdownVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java 3 files changed, 20 insertions(+), 1 deletion(-) Approvals: Roy Golan: Verified Omer Frenkel: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/24239 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6109ef0ea4869b59a93be6fef4b0c3cff50da62e Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Mark Huth <mhuth@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
rgolan@redhat.com