Daniel Erez has posted comments on this change.
Change subject: core: synchronize lun device size on refreshLunsInfo
......................................................................
Patch Set 5:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/SyncLunsInfoForIscsiStorageDomainCommand.java
Line 100:
Line 101: if
(!lunFromDb.getLUN_id().equals(lunFromVgInfo.getLUN_id())) {
Line 102: return true;
Line 103: }
Line 104: else if (lunFromDb.getDeviceSize() !=
lunFromVgInfo.getDeviceSize()) {
Right, this method just looks for a mismatch as indication that
'refreshLunsInfo' is needed. The 'continue' in the first 'if' condition filters
not matched LUNs.
Line 105: // Size mismatch detected - refresh info is needed
Line 106: return true;
Line 107: }
Line 108: }
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/LunDAOTest.java
Line 91: public void testUpdateLUNsDeviceSize() {
Line 92: int testDeviceSize = 20;
Line 93: dao.updateLUNsDeviceSize(existingLUN.getLUN_id(),
testDeviceSize);
Line 94: LUNs dbLun = dao.get(existingLUN.getLUN_id());
Line 95: assertEquals("LUNs volume group id wasn't updated",
testDeviceSize, dbLun.getDeviceSize());
Done
Line 96: }
Line 97:
Line 98: /**
Line 99: * Ensures that an empty collection is returned.
....................................................
File packaging/dbscripts/storages_san_sp.sql
Line 35:
Line 36:
Line 37:
Line 38:
Line 39: Create or replace FUNCTION UpdateLUNsDeviceSize(v_LUN_id VARCHAR(50),
It's just for keeping the convention of entity's name 'LUNs' and the above
method 'UpdateLUNsVolumeGroupId'. But as discussed, I'll introduce UpdateLUN
method to replace these.
Line 40: v_device_size INTEGER)
Line 41: RETURNS VOID
Line 42: AS $procedure$
Line 43: BEGIN
--
To view, visit http://gerrit.ovirt.org/22887
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I618880c7b49c226e39f0a0830f1d4f9b71a5f304
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches