Sahina Bose has posted comments on this change.

Change subject: gluster: Command to update gluster hook on servers
......................................................................


Patch Set 1: (4 inline comments)

Kanagaraj, the commit message is inline with the implementation. Some of the 
comments in the file are misleading and I will correct those.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterHookCommand.java
Line 61:     private List<GlusterServerHook> getMissingServerHooks() {
Line 62:         //get all destination servers - only serverhooks with status 
missing
Line 63:         List<GlusterServerHook> serverHooks = new 
ArrayList<GlusterServerHook>();
Line 64:         for (GlusterServerHook serverHook: 
getGlusterHook().getServerHooks()) {
Line 65:             if 
(!serverHook.getStatus().equals(GlusterHookStatus.MISSING)) {
No..we are checking for status != MISSING, as this is an update command.
The comments are misleading, so will be updated in the following patchset.
Line 66:                 serverHooks.add(serverHook);
Line 67:             }
Line 68:         }
Line 69:         return serverHooks;


Line 82: 
Line 83:         if (getGlusterHook() == null) {
Line 84:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST);
Line 85:             return false;
Line 86:         }
Done
Line 87: 
Line 88:         if (getMissingServerHooks().isEmpty()) {
Line 89:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_NO_CONFLICT_SERVERS);
Line 90:             return false;


Line 148:             });
Line 149:         }
Line 150: 
Line 151:         setSucceeded(true);
Line 152:         List<Pair<GlusterServerHook, VDSReturnValue>> pairResults = 
ThreadPoolUtil.invokeAll(taskList);
WIill add, though there's already a check for getMissingServerHooks() being 
empty.
Line 153:         for (Pair<GlusterServerHook, VDSReturnValue> pairResult : 
pairResults) {
Line 154: 
Line 155:             VDSReturnValue retValue = pairResult.getSecond();
Line 156:             if (!retValue.getSucceeded() ) {


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterResolveHookParameters.java
Line 17:     private Guid hookId;
Line 18: 
Line 19:     private Guid sourceServerId;
Line 20: 
Line 21:     private GlusterHookStatus hookStatus;
Right.
Line 22: 
Line 23:     public GlusterResolveHookParameters(Guid hookId) {
Line 24:         super();
Line 25:         setHookId(hookId);


--
To view, visit http://gerrit.ovirt.org/14935
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibccccbbed1e07d471dc472c41843f46767b9e083
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to