Dhandapani Gopal has posted comments on this change.
Change subject: engine: Validation added in Import Cluster
......................................................................
Patch Set 2: (4 inline comments)
Incorporated review comments.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterServersForImportQuery.java
Line 54: if (getVdsStaticDao().get(getParameters().getServerName()) !=
null) {
Line 55: getQueryReturnValue().setSucceeded(false);
Line 56:
getQueryReturnValue().setExceptionString(VdcBllMessages.SERVER_ALREADY_EXIST_IN_ANOTHER_CLUSTER.name());
Line 57: return;
Line 58: }
Done
Line 59:
Line 60: SSHClient client = null;
Line 61:
Line 62: try {
Line 67:
Line 68: Map<String, String> serverFingerPrint =
extractServers(serversXml);
Line 69: if (serverFingerPrint == null) {
Line 70: getQueryReturnValue().setSucceeded(false);
Line 71:
getQueryReturnValue().setExceptionString(VdcBllMessages.SERVER_ALREADY_EXIST_IN_ANOTHER_CLUSTER.name());
Introduced a method isServerPartOfCluster() to check whether the server exists
or not in the existing cluster.
Line 72: return;
Line 73: }
Line 74: getQueryReturnValue().setReturnValue(serverFingerPrint);
Line 75: } catch (Exception e) {
Line 102: // Add the server only if the state is 3
Line 103: if (state == PEER_IN_CLUSTER) {
Line 104: String hostName =
XmlUtils.getTextValue(firstHostElement, HOST_NAME);
Line 105: // Check if any of the server in the peer list is
already part of some other cluster.
Line 106: if (getVdsStaticDao().get(hostName) != null) {
Done
Line 107: return null;
Line 108: }
Line 109: fingerprints.put(hostName,
getFingerprint(hostName));
Line 110: }
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
Line 664: VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME,
Line 665: ACTION_TYPE_FAILED_NO_GLUSTER_HOST_TO_PEER_PROBE,
Line 666: MIGRATE_PAUSED_VM_IS_UNSUPPORTED,
Line 667: ACTION_TYPE_FAILED_SERVER_NAME_REQUIRED,
Line 668: SERVER_ALREADY_EXIST_IN_ANOTHER_CLUSTER,
Done
Line 669:
Line 670: VM_INTERFACE_NOT_EXIST,
Line 671: ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_DEVICE,
Line 672: ACTION_TYPE_FAILED_IMPORT_CLONE_NOT_COLLAPSED,
--
To view, visit http://gerrit.ovirt.org/9784
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8323f2dcc4f278dfbc01f99ebe18b0f2bd0296ca
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches