Sergey Gotliv has posted comments on this change. Change subject: engine: Setup multiple iscsi sessions with the iscsi target ......................................................................
Patch Set 2: (4 comments) http://gerrit.ovirt.org/#/c/23198/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java: Line 83: for (StorageServerConnections conn : conns) { Line 84: // Get list of endpoints (nics or vlans) that will initiate iscsi sessions. Line 85: // Targets are represented by StorageServerConnections object (connection, iqn, port, portal). Line 86: List<VdsNetworkInterface> initiators = DbFacade.getInstance().getInterfaceDao() Line 87: .getIscsiInitiatorsByVdsIdAndStorageTargetId(vdsId, conn.getid()); > There is no getIscsiInitiatorsByVdsIdAndStorageTargetId in InterfaceDAO onl :-). I didn't compile after rename suggested in the previous patch set. Good catch. Line 88: Line 89: if (initiators != null && !initiators.isEmpty()) { Line 90: conn.setInitiatorName(initiators.remove(0).getName()); Line 91: Line 85: // Targets are represented by StorageServerConnections object (connection, iqn, port, portal). Line 86: List<VdsNetworkInterface> initiators = DbFacade.getInstance().getInterfaceDao() Line 87: .getIscsiInitiatorsByVdsIdAndStorageTargetId(vdsId, conn.getid()); Line 88: Line 89: if (initiators != null && !initiators.isEmpty()) { > 1) IINM initiators should not be null Done Line 90: conn.setInitiatorName(initiators.remove(0).getName()); Line 91: Line 92: // Iscsi target is represented by connection object, therefore if this target is approachable Line 93: // from more than one endpoint(initiator) we have to clone this connection per endpoint. Line 94: for (VdsNetworkInterface initiator : initiators) { Line 95: StorageServerConnections newConn = StorageServerConnections.copyOf(conn); Line 96: newConn.setid(Guid.newGuid().toString()); Line 97: newConn.setInitiatorName(initiator.getName()); Line 98: res.add(newConn); > The logic seems fine, but I don't really understand why it looks that compl Correct. But since I clone the existing connection I have to create new id if there are more than one initiator. Line 99: } Line 100: } Line 101: } Line 102: http://gerrit.ovirt.org/#/c/23198/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java: Line 176: @Min(value = 0, message = "VALIDATION_STORAGE_CONNECTION_NFS_RETRANS") Line 177: @Max(value = Short.MAX_VALUE, message = "VALIDATION_STORAGE_CONNECTION_NFS_RETRANS") Line 178: private Short nfsRetrans; Line 179: Line 180: private String initiatorName; > Where is this field being added? where is it used? saved in the table? This field is added and used in classes that appear in that patch :-). IscsiStorageHelper and ConnectStorageServerVDSCommand. This field is transient and taken from the NIC/VLAN therefore this is already valid and doesn't require any further validation. I can mark it as @Transient if it will help. Line 181: Line 182: public String getInitiatorName() { Line 183: return initiatorName; Line 184: } -- To view, visit http://gerrit.ovirt.org/23198 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I779f6dd95dfbfc2b74ad7ba3ce2271b7c9ad94db Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> 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