Maor Lipchuk 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,
> there's no harm, but it's unneeded (and also requires spm..opposed to befor
move this to AttachStorage command
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
Moved to AttachStorage command
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
doine
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?
In the attach phase It will already be propogated to the user, since we will 
get a VDS error which will be translated 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 <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to