anmolbabu has posted comments on this change. Change subject: engine : Bll Command for Create Geo Rep session ......................................................................
Patch Set 16: (3 comments) http://gerrit.ovirt.org/#/c/29834/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeGeoRepSessionCreateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeGeoRepSessionCreateCommand.java: Line 42: Line 43: List<GlusterGeoRepSession> sessions = getGlusterGeoRepDao().getGeoRepSessions(parameter.getVolumeId()); Line 44: if (sessions != null) { Line 45: for (GlusterGeoRepSession session : sessions) { Line 46: if (session.getMasterVolumeId() == parameter.getVolumeId() > Take care of FindBugs -- should be equals(parameter.getVolumeId()) Done Line 47: && session.getSlaveHostName() == parameter.getSlaveHost() Line 48: && session.getSlaveVolumeName() == parameter.getSlaveVolumeName()) { Line 49: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_CREATED); Line 50: return false; Line 75: if (!sessionCreateReturnValue.getSucceeded()) { Line 76: handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_CREATE_FAILED, sessionCreateReturnValue.getVdsError().getMessage()); Line 77: return; Line 78: } Line 79: setSucceeded(sessionCreateReturnValue.getSucceeded()); > Add an entry in the database, once session is created? Done Line 80: } else { Line 81: handleVdsError(AuditLogType.GLUSTER_VOLUME_PASSWORD_LESS_SSH_FAILED, passwordlessSSHCreateReturnValue.getVdsError().getMessage()); Line 82: setSucceeded(false); Line 83: } http://gerrit.ovirt.org/#/c/29834/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtil.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtil.java: Line 210: } Line 211: Line 212: public String getHostSSHFingerPrint(String hostName) { Line 213: try (EngineSSHClient client = new EngineSSHClient()){ Line 214: connect(client, hostName); > or client.setHost(hostName) connect(client, hostName) does these with some extra config such as : client.setHardTimeout(timeout); client.setSoftTimeout(timeout); I mean it sets hard and soft timeouts also.I thought this timeout interval might be standard across ovirt-engine.So just reused this function Line 215: return client.getHostFingerprint(); Line 216: } catch (IOException e) { Line 217: log.error("Error while fetching host key", e); Line 218: throw new RuntimeException(e); -- To view, visit http://gerrit.ovirt.org/29834 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iccc92235deea42d7818336b2402476193cbe789c Gerrit-PatchSet: 16 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches