Allon Mureinik has posted comments on this change.

Change subject: core: NPEs and wrong persisted information when reusing LUNs
......................................................................


Patch Set 7: I would prefer that you didn't submit this

(8 inline comments)

see inline

....................................................
File backend/manager/dbscripts/storages_san_sp.sql
Line 23: 
Line 24: 
Line 25: 
Line 26: Create or replace FUNCTION UpdateLUNsVolumeGroupId(v_LUN_id 
VARCHAR(50),
Line 27: v_volume_group_id VARCHAR(50))
see comment in patchset 4
Line 28: RETURNS VOID
Line 29:    AS $procedure$
Line 30: BEGIN
Line 31: UPDATE LUNs set volume_group_id = v_volume_group_id where LUN_id = 
v_LUN_ID;


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 673:         if (!lun.getLunConnections().isEmpty()) {
Line 674:             StorageHelperDirector.getInstance().getItem(
Line 675:                     
lun.getLunConnections().get(0).getstorage_type()).removeLun(lun);
Line 676:         } else {
Line 677:             
StorageHelperDirector.getInstance().getItem(StorageType.FCP).removeLun(lun);
why force FCP?
Line 678:         }
Line 679: 
Line 680:     }
Line 681: 


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java
Line 190:     public boolean StorageDomainRemoved(storage_domain_static 
storageDomain) {
Line 191:         int numOfRemovedLuns = removeStorageDomainLuns(storageDomain);
Line 192:         if (numOfRemovedLuns > 0) {
Line 193:             List<storage_server_connections> list = 
DbFacade.getInstance()
Line 194:                     
.getStorageServerConnectionDao().getAllForVolumeGroup(storageDomain.getstorage());
this looks like a semantic cleanup - is it relevant to the patch?
Line 195:             for (storage_server_connections connection : 
FilterConnectionsUsedByOthers(list, storageDomain.getstorage())) {
Line 196:                 
DbFacade.getInstance().getStorageServerConnectionDao().remove(connection.getid());
Line 197:             }
Line 198:         }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 226:         }
Line 227:     }
Line 228: 
Line 229:     public static void proceedLUNInDb(final LUNs lun, StorageType 
storageType) {
Line 230:         proceedLUNInDb(lun,storageType,"");
see comment in patchset 4
Line 231:     }
Line 232: 
Line 233:     public static void proceedLUNInDb(final LUNs lun, StorageType 
storageType, String volumeGroupId) {
Line 234:         if (DbFacade.getInstance().getLunDao().get(lun.getLUN_id()) 
== null) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
Line 133:                 
DbFacade.getInstance().getLunDao().remove(lun.getLUN_id());
Line 134:                 numOfRemovedLuns++;
Line 135:             } else {
Line 136:                 
DbFacade.getInstance().getLunDao().updateLUNsVolumeGroupId(lun.getLUN_id(), "");
Line 137:             }
why "" and not null?
Line 138:         }
Line 139:         return numOfRemovedLuns;
Line 140:     }
Line 141: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LunDAODbFacadeImpl.java
Line 46:         return getCallsHandler().executeRead("GetLUNByLUNId", MAPPER, 
parameterSource);
Line 47:     }
Line 48: 
Line 49:     @Override
Line 50:     public void updateLUNsVolumeGroupId(String id, String 
volumeGroupId) {
see comment in patchset 4
Line 51:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource().addValue("LUN_id", id)
Line 52:                 .addValue("volume_group_id", volumeGroupId);
Line 53: 
Line 54:         
getCallsHandler().executeModification("UpdateLUNsVolumeGroupId", 
parameterSource);


Line 48: 
Line 49:     @Override
Line 50:     public void updateLUNsVolumeGroupId(String id, String 
volumeGroupId) {
Line 51:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource().addValue("LUN_id", id)
Line 52:                 .addValue("volume_group_id", volumeGroupId);
see comment in patchset 4
Line 53: 
Line 54:         
getCallsHandler().executeModification("UpdateLUNsVolumeGroupId", 
parameterSource);
Line 55:     }
Line 56: 


Line 61:                 .addValue("storage_server_connection", id);
Line 62: 
Line 63:         return 
getCallsHandler().executeReadList("GetLUNsBystorage_server_connection", MAPPER, 
parameterSource);
Line 64:     }
Line 65: 
see comment in patchset 4
Line 66:     @Override
Line 67:     public List<LUNs> getAllForVolumeGroup(String id) {
Line 68:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource()
Line 69:                 .addValue("volume_group_id", id);


--
To view, visit http://gerrit.ovirt.org/9229
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I38a0e3c68cb8bd80c2f78ee5aacfccc8c987a79e
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to