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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: LiJiansheng <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: plysan <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches