Alon Bar-Lev has posted comments on this change. Change subject: engine: Get Gluster Servers query ......................................................................
Patch Set 5: (6 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterServersQuery.java Line 93: Line 94: public boolean connect() { Line 95: boolean connectStatus = false; Line 96: client = getSSHClient(); Line 97: Integer timeout = Config.<Integer> GetValue(ConfigValues.SSHInactivityTimoutSeconds) * 1000; Maybe this should be ConfigValues.ConnectToServerTimeoutInSeconds? As the node id command. Line 98: client.setHardTimeout(timeout); Line 99: client.setSoftTimeout(timeout); Line 100: client.setHost(getParameters().getServerName(), port); Line 101: client.setUser("root"); Line 100: client.setHost(getParameters().getServerName(), port); Line 101: client.setUser("root"); Line 102: client.setPassword(getParameters().getRootPassword()); Line 103: try { Line 104: client.connect(); Didn't you want to do something with the fingerprint? Line 105: client.authenticate(); Line 106: connectStatus = true; Line 107: } catch (Exception e) { Line 108: log.debug( Line 122: String m = Line 123: String.format("SSH error running command %1$s '%2$s': %3$s", this.host, command, e.getMessage()); Line 124: log.error(m, e); Line 125: } Line 126: return cliOutput; Won't it better to through the exception in case of an error? Line 127: } Line 128: Line 129: /** Line 130: * Destructor. Line 144: } Line 145: return serverFingerprint; Line 146: } Line 147: Line 148: private String getFingerprint(String hostName) { Oh... so don't use the VdsInstaller for the finger print, use the SSHClient, as you already connects... Line 149: wrapper = getVdsInstallerSSHInstance(); Line 150: String fingerPrint = ""; Line 151: try { Line 152: fingerPrint = wrapper.getServerKeyFingerprint(hostName); Line 181: NodeList nodes = element.getElementsByTagName(tagName); Line 182: Element nodeElement = (Element) nodes.item(0); Line 183: Line 184: NodeList nodeList = nodeElement.getChildNodes(); Line 185: return nodeList.item(0).getNodeValue().trim(); return element.getElementByTagName(tagName).item(0).getChildNodes().item(0).getNodeValue.trim(); Looks very long for standard text node extraction... Line 186: } Line 187: Line 188: public VdsInstallerSSH getVdsInstallerSSHInstance() { Line 189: return new VdsInstallerSSH(); Line 188: public VdsInstallerSSH getVdsInstallerSSHInstance() { Line 189: return new VdsInstallerSSH(); Line 190: } Line 191: Line 192: public class SimpleCallback implements IVdsInstallerCallback { This is not required any more. Line 193: Line 194: public String glusterServersXml; Line 195: Line 196: @Override -- To view, visit http://gerrit.ovirt.org/7584 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic69a9a48bf227c8fa805c8aa9c4f08fa36ea9425 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dhandapani Gopal <dgo...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Dhandapani Gopal <dgo...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Selvasundaram <sesub...@redhat.com> Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches