Maor Lipchuk has posted comments on this change. Change subject: engine: Add support for Refresh LUNs size ......................................................................
Patch Set 11: (9 comments) https://gerrit.ovirt.org/#/c/39318/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RefreshLunsSizeCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RefreshLunsSizeCommand.java: Line 33: import org.ovirt.engine.core.utils.linq.LinqUtils; Line 34: import org.ovirt.engine.core.utils.transaction.TransactionMethod; Line 35: Line 36: @NonTransactiveCommandAttribute(forceCompensation = true) Line 37: public class RefreshLunsSizeCommand<T extends ExtendSANStorageDomainParameters> extends Do we need to lock the Storage Domain in this memory? using getExclusiveLocks? Line 38: StorageDomainCommandBase<T> { Line 39: Line 40: private boolean deviceSizeVisibilityError = false; Line 41: Line 82: // LUN is part of the storage domain Line 83: lunsList.remove(lun.getLUN_id()); Line 84: } Line 85: } Line 86: return lunsList.isEmpty(); Probably worth to add a log of the redundant luns. Line 87: } Line 88: Line 89: @Override Line 90: protected void executeCommand() { Line 179: log.debug("PV size after resize of LUN " + lun + " :" + pvSizeInBytes + " bytes"); Line 180: } Line 181: } Line 182: Line 183: private Long resizePV(String lunId) { You already have a method with the same name "resizePV" consider to use a different name, maybe something like resizeStorageDomainPV (the same as the VDS command) Line 184: return (Long) runVdsCommand( Line 185: VDSCommandType.ResizeStorageDomainPV, Line 186: new ResizeStorageDomainPVVDSCommandParameters(getStoragePoolId(), Line 187: getStorageDomainId(), lunId)).getReturnValue(); https://gerrit.ovirt.org/#/c/39318/11/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResourceTest.java File backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResourceTest.java: Line 115: return entity; Line 116: } Line 117: Line 118: private org.ovirt.engine.core.common.businessentities.StorageDomain getIscsiEntity() { Line 119: org.ovirt.engine.core.common.businessentities.StorageDomain entity = control.createMock(org.ovirt.engine.core.common.businessentities.StorageDomain.class); formatter? Line 120: expect(entity.getId()).andReturn(GUIDS[0]).anyTimes(); Line 121: expect(entity.getStorageName()).andReturn(NAMES[0]).anyTimes(); Line 122: expect(entity.getStorageDomainType()).andReturn(org.ovirt.engine.core.common.businessentities.StorageDomainType.Data).anyTimes(); Line 123: expect(entity.getStorageType()).andReturn(org.ovirt.engine.core.common.businessentities.storage.StorageType.ISCSI).anyTimes(); https://gerrit.ovirt.org/#/c/39318/11/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java: Line 1228: public StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate(String volumeName, String remoteHost, String remotVolumeName, String remoteUserName, Boolean force) { Line 1229: JsonRpcRequest request = Line 1230: new RequestBuilder("GlusterVolume.geoRepSessionCreate").withParameter("volumeName", volumeName) Line 1231: .withParameter("remoteHost", remoteHost) Line 1232: .withParameter("remoteVolumeName", remotVolumeName) Is this formatted? Line 1233: .withParameter("force", force) Line 1234: .withOptionalParameter("remoteUserName", remoteUserName).build(); Line 1235: Map<String, Object> response = new FutureMap(this.client, request); Line 1236: return new StatusOnlyReturnForXmlRpc(response); Line 1230: new RequestBuilder("GlusterVolume.geoRepSessionCreate").withParameter("volumeName", volumeName) Line 1231: .withParameter("remoteHost", remoteHost) Line 1232: .withParameter("remoteVolumeName", remotVolumeName) Line 1233: .withParameter("force", force) Line 1234: .withOptionalParameter("remoteUserName", remoteUserName).build(); same Line 1235: Map<String, Object> response = new FutureMap(this.client, request); Line 1236: return new StatusOnlyReturnForXmlRpc(response); Line 1237: } Line 1238: Line 1289: public StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete(String volumeName, String remoteHost, String remoteVolumeName) { Line 1290: JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepSessionDelete") Line 1291: .withParameter("volumeName", volumeName) Line 1292: .withParameter("remoteHost", remoteHost) Line 1293: .withParameter("remoteVolumeName", remoteVolumeName) same Line 1294: .build(); Line 1295: Map<String, Object> response = new FutureMap(this.client, request); Line 1296: return new StatusOnlyReturnForXmlRpc(response); Line 1297: } Line 1396: JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepConfigReset") Line 1397: .withParameter("volumeName", volumeName) Line 1398: .withParameter("remoteHost", slaveHost) Line 1399: .withParameter("remoteVolumeName", slaveVolumeName) Line 1400: .withParameter("optionName", configKey) formatter? Line 1401: .build(); Line 1402: Map<String, Object> response = new FutureMap(this.client, request); Line 1403: return new StatusOnlyReturnForXmlRpc(response); Line 1404: } Line 1407: public GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList(String volumeName, String slaveHost, String slaveVolumeName) { Line 1408: JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepConfigList") Line 1409: .withParameter("volumeName", volumeName) Line 1410: .withParameter("remoteHost", slaveHost) Line 1411: .withParameter("remoteVolumeName", slaveVolumeName) formatter? Line 1412: .build(); Line 1413: Map<String, Object> response = new FutureMap(this.client, request); Line 1414: return new GlusterVolumeGeoRepConfigListXmlRpc(response); Line 1415: } -- To view, visit https://gerrit.ovirt.org/39318 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c5c6d59087736466ee5e7eb0c77ee9282199c62 Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Freddy Rolland <froll...@redhat.com> Gerrit-Reviewer: Ala Hino <ah...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Fred Rolland <froll...@redhat.com> Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com> Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com> Gerrit-Reviewer: Idan Shaby <ish...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches