Shireesh Anjal has posted comments on this change.
Change subject: engine: Move Gluster host
......................................................................
Patch Set 3: (6 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
Line 92:
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_GLUSTER_HOST_TO_PEER_PROBE);
I think this validation is essentially same as the previous one, except that it
is being done on the 'target cluster'. So it will be good if you can
- move this into a separate method that takes the cluster id as argument and
returns a boolean.
- use the same message code, dynamically adding the cluster name as a variable
in the message description.
Line 129: if
(getVdsGroup(getParameters().getClusterId()).supportsGlusterService()) {
Introducing methods like getSourceClusterId(), getSourceCluster(),
getTargetClusterId() and getTargetCluster() will make the code more readable,
instead of repeating code like getVdsGroup(getParameters().getClusterId()) in
multiple places.
Line 180: if (getClusterUtils().hasServers(sourceClusterId)
Isn't this validation already happening in canDoAction?
If this if condition fails, the method will return without any error. Is that
ok?
Line 211:
getReturnValue().getFault().setError(returnValue.getVdsError().getCode());
Introduce a method similar to GlusterCommandBase#handleVdsError for this error
handling. An important thing is to add the ExecuteFailedMessages as well, which
is returned in the result of REST api.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
Line 65: public boolean hasVolumeOnServer(Guid vdsId) {
The name is not very clear. Can you change it to 'hasBricks(Guid serverId)' ?
Also, I'm not sure if this method belongs to 'ClusterUtils'. I think it would
be a good idea to introduce a 'GlusterUtils' for gluster cluster related
utility methods, and keep ClusterUtils for the more generic Cluster / VdsGroup.
....................................................
File
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Line 525: GLUSTER_HOST_ADD_FAILED=Failed to add gluster server ${VdsName}.
It will be great if you can add the name of the cluster on which add / remove
failed.
--
To view, visit http://gerrit.ovirt.org/5285
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I24bd7d34c2312c34de63371912444c21b2896737
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Selvasundaram <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Selvasundaram <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches