Change in ovirt-engine[ovirt-engine-3.3]: core: prevent split brain caused by fence commands
iheim at redhat.com
iheim at redhat.com
Wed Nov 13 08:58:46 UTC 2013
Itamar Heim 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 <rgolan at 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/VdsNotRespondingTreatmentCommand.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
11 files changed, 136 insertions(+), 9 deletions(-)
Approvals:
Itamar Heim: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/21143
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf021010188e3c3662fbf8a057da4c58f2600c02
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list