Eduardo has posted comments on this change.
Change subject: core: Fix IndexOutOfBoundsException in plug FC disk
......................................................................
Patch Set 7: I would prefer that you didn't submit this
(1 inline comment)
In addition if you are assuming that the connection list is empty, you should
look that all the relevant code (detach?) supports an empty list too.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
Line 77: */
Line 78: protected StorageType getLUNStorageType(LUNs lun) {
Line 79: return lun.getLunConnections().isEmpty() ? StorageType.FCP :
lun.getLunConnections().get(0).getstorage_type();
Line 80: }
Line 81:
Again:
lun.getLunConnections().get(0).getstorage_type() assume that all LUN
connections are of the same type. This is false. The same LUN can be exposed by
different transports.
The empty connection list = FCP inference is False. A local LUN has no
connections too.
Before plugging the LUN the host should be connected to the storage server
using the proper type. if there are no connections there is no need for an
explicit connection Assuming FCP is wrong and unnecessary at all.
Line 82: /**
Line 83: * Sets the LUN connection list from the DB.
Line 84: *
Line 85: * @param lun
--
To view, visit http://gerrit.ovirt.org/9724
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6414445b9a74be299205ff7fc9a21d1388a29687
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: liron aravot <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches