Omer Frenkel has submitted this change and it was merged. Change subject: core: prevent split brain caused by fence commands ......................................................................
core: prevent split brain caused by fence commands This fix aims to run fence command mutually exclusive. RestartVds is running Stop, FenceManually and Start. This flow is marking VMs as down and playing them again on other hosts. 2 parallel calls to this flow or interleacing RestartVds with other Stop or FenceManaually could end up marking again VMs whic currently starting up by flow 1 as down, causing them to start and new instance on other host and leading to 2 instances of the same VM. To Achieve this mutually exclusive run: * Added exclusive lock on VDS_FENCE + vdsId on RestartVds, Stop, FenceManually and Start commands * Shared the lock from parent RestartVds with childs Stop, FenceManually and start * overriden freeLock() method of Stop, FenceManually and Start to release the lock only if we have been invoked without RestartVds as a parent command Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1026811 Change-Id: Iaf021010188e3c3662fbf8a057da4c58f2600c02 Signed-off-by: Roy Golan <rgo...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StartVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FenceVdsManualyCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 10 files changed, 130 insertions(+), 9 deletions(-) Approvals: Omer Frenkel: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/21049 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf021010188e3c3662fbf8a057da4c58f2600c02 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches