Michael Kublin has posted comments on this change.

Change subject: core: notify user about broken domain tasks (#753591)
......................................................................


Patch Set 5: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommand.java
Line 234:     }
Line 235: 
Line 236:     /**
Line 237:      * Send notification to user about tasks still running at the 
moment when the storage got deactivated.
Line 238:      */
These should not happens, look at canDoAction of DeactivateStorageDomain:
 if (getStoragePool().getspm_vds_id() != null) {
            // In case there are running tasks in the pool, it is impossible to 
deactivate the master storage domain
            if (getStorageDomain().getstorage_domain_type() == 
StorageDomainType.Master &&
            
getAsyncTaskDao().getAsyncTaskIdsByStoragePoolId(getStorageDomain().getstorage_pool_id().getValue()).size()
 > 0) {
                
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_MASTER_DOMAIN_WITH_TASKS_ON_POOL);
                return false;
            } else if (getStorageDomain().getstorage_domain_type() != 
StorageDomainType.ISO
            && 
getAsyncTaskDao().getAsyncTaskIdsByEntity(getParameters().getStorageDomainId()).size()
 > 0) {
               
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_DEACTIVATE_DOMAIN_WITH_TASKS);
               return false;
            }
        }
Line 239:     private void notifyAsyncTasks() {
Line 240:         final List<Guid> asyncTasks =
Line 241:                 getDbFacade().getAsyncTaskDao()
Line 242:                 
.getAsyncTaskIdsByEntity(getParameters().getStorageDomainId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2b6239668eece2be39b96c9bd360af2bd310a3b0
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to