Kanagaraj M has posted comments on this change.
Change subject: engine: Enable gluster hook on cluster
......................................................................
Patch Set 14: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookStatusChangeCommand.java
Line 113: }
Line 114: }
Line 115: }
Line 116:
Line 117: int maxPossibleErrors = serverHooks.size() >= servers.size()
? (servers.size() + 1) : servers.size();
Can we simplify this logic, i think this is bit complicated?
Also this wont work for the following scenario
serverHook.size is 3. and server.size is 4 (actually 5 servers in db and one is
down).
Now assume enabling hook is failed in all 4 servers, and the error.size would
be 5.
but this is not equal to maxPossibleErrors which is 4.
We can make the whole logic simple by having a boolean flag(default false), and
set it true in Line:99, and setSucceeded(flag value). And will add the
StatusConflict if error size >0, the same current way.
Line 118:
Line 119: if (errors.size() > 0) {
Line 120: // conflict in status
Line 121: entity.addStatusConflict();
--
To view, visit http://gerrit.ovirt.org/10906
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icc6f9c77393ebed2803ec2a1b295a09f61642c31
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Selvasundaram <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Selvasundaram <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches