Allon Mureinik has posted comments on this change.

Change subject: engine: check active vds before activate storage domain
......................................................................


Patch Set 3:

(1 comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 214:                 return true;
Line 215:             }
Line 216:         }
Line 217:         
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_ACTIVE_HOST_IN_STORAGE_POOL);
Line 218:         return false;
Sorry for missing this in the previous revision, but this method can be 
considerably simplified by simply querying only the active VDSs:

protected boolean checkActiveVdsInStoragePool() {
  List<VDS> vdss = 
getVdsDAO().getAllForStoragePoolAndStatus(getParameters().getStoragePoolId(), 
VDSStatus.Up);
  if (vdss.isEmpty) {
    
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NO_ACTIVE_HOST_IN_STORAGE_POOL);
    return false;
  }
  return true;
}
Line 219:     }
Line 220: 
Line 221:     protected void setStorageDomainStatus(StorageDomainStatus status, 
CompensationContext context) {
Line 222:         if (getStorageDomain() != null && 
getStorageDomain().getStoragePoolId() != null) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3e45b53d15b757237af8c76457f213c00a73909
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: plysan <ply...@gmail.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: LiJiansheng <lijiangshe...@gmail.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: plysan <ply...@gmail.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to