Allon Mureinik has posted comments on this change.

Change subject: core: Add a query for attached Storage Domains
......................................................................


Patch Set 15:

(3 comments)

http://gerrit.ovirt.org/#/c/34233/15/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetStorageDomainsWithAttachedStoragePoolGuidQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetStorageDomainsWithAttachedStoragePoolGuidQuery.java:

Line 43:         // Get a Host which is at UP state to connect to the Storage 
Domain.
Line 44:         List<VDS> hosts =
Line 45:                 
getDbFacade().getVdsDao().getAllForStoragePoolAndStatus(getParameters().getId(),
 VDSStatus.Up);
Line 46:         if (!hosts.isEmpty()) {
Line 47:             vdsId = hosts.get(new 
Random().nextInt(hosts.size())).getId();
For consistency's sake, please user SecureRandom
Line 48:             log.info("vds id '{}' was chosen to fetch the Storage 
domain info", vdsId);
Line 49:         } else {
Line 50:             log.warn("No vds was chosen to fetch the Storage domain 
info");
Line 51:             return;


Line 46:         if (!hosts.isEmpty()) {
Line 47:             vdsId = hosts.get(new 
Random().nextInt(hosts.size())).getId();
Line 48:             log.info("vds id '{}' was chosen to fetch the Storage 
domain info", vdsId);
Line 49:         } else {
Line 50:             log.warn("No vds was chosen to fetch the Storage domain 
info");
The log should say that there's no VDS in UP status - that's the root cause 
here.
Line 51:             return;
Line 52:         }
Line 53: 
Line 54:         List<StorageDomainStatic> 
storageDomainsWithAttachedStoragePoolId = new ArrayList<>();


Line 66:         return getParameters().getStorageDomainList() != null;
Line 67:     }
Line 68: 
Line 69:     private Boolean isFileDomain() {
Line 70:         return getParameters().getStorageServerConnection() != null;
huh?
Line 71:     }
Line 72: 
Line 73:     private List<StorageDomainStatic> getBlockStorageDomains() {
Line 74:         VDSReturnValue vdsReturnValue = null;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id6fc7a2d722611b1bccecee9868223ff437596ed
Gerrit-PatchSet: 15
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: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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