Liron Aravot has posted comments on this change. Change subject: core: Force detach a storage domain ......................................................................
Patch Set 3: (4 comments) http://gerrit.ovirt.org/#/c/29021/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingFileStorageDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingFileStorageDomainCommand.java: Line 49: // Storage pool id can be empty Line 50: DetachStorageDomainVDSCommandParameters detachParams = Line 51: new DetachStorageDomainVDSCommandParameters(getVds().getStoragePoolId(), Line 52: getParameters().getStorageDomainId(), Line 53: Guid.Empty, isn't it relevant only for the import storage domain flow and not for all execution of AddExistingStorageDomain? Line 54: 0); Line 55: detachParams.setForce(true); Line 56: VDSReturnValue returnValue = runVdsCommand(VDSCommandType.DetachStorageDomain, detachParams); Line 57: if (!returnValue.getSucceeded()) { Line 52: getParameters().getStorageDomainId(), Line 53: Guid.Empty, Line 54: 0); Line 55: detachParams.setForce(true); Line 56: VDSReturnValue returnValue = runVdsCommand(VDSCommandType.DetachStorageDomain, detachParams); *this is a spm command now, opposed to before which might be a regression *you should now add CDA to check the pool status, etc. Line 57: if (!returnValue.getSucceeded()) { Line 58: log.warnFormat("Detaching Storage Domain {0} from it's previous storage pool has failed. " + Line 59: "The meta data of the Storage Domain might still indicating that it is attached to the previous Storage Pool.", Line 60: getParameters().getStorageDomainId()); Line 55: detachParams.setForce(true); Line 56: VDSReturnValue returnValue = runVdsCommand(VDSCommandType.DetachStorageDomain, detachParams); Line 57: if (!returnValue.getSucceeded()) { Line 58: log.warnFormat("Detaching Storage Domain {0} from it's previous storage pool has failed. " + Line 59: "The meta data of the Storage Domain might still indicating that it is attached to the previous Storage Pool.", /s/indicating/indicate /the previous/a different Line 60: getParameters().getStorageDomainId()); Line 61: } Line 62: if (StringUtils.isEmpty(getStorageDomain().getStorage())) { Line 63: getStorageDomain().setStorage( Line 56: VDSReturnValue returnValue = runVdsCommand(VDSCommandType.DetachStorageDomain, detachParams); Line 57: if (!returnValue.getSucceeded()) { Line 58: log.warnFormat("Detaching Storage Domain {0} from it's previous storage pool has failed. " + Line 59: "The meta data of the Storage Domain might still indicating that it is attached to the previous Storage Pool.", Line 60: getParameters().getStorageDomainId()); *do we need to continue in the flow in that case? what's the purpose? *what about propagating the error so it'll be returned and displayed to the user? Line 61: } Line 62: if (StringUtils.isEmpty(getStorageDomain().getStorage())) { Line 63: getStorageDomain().setStorage( Line 64: (String) Backend -- To view, visit http://gerrit.ovirt.org/29021 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie75293678ab08616208128ac157426d3d98c1b77 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: [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
