Liron Aravot has posted comments on this change.

Change subject: core: Report unreachable domain names when setting host as non 
operational
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.ovirt.org/#/c/28859/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java:

Line 76: @NonTransactiveCommandAttribute
Line 77: public class InitVdsOnUpCommand extends 
StorageHandlingCommandBase<HostStoragePoolParametersBase> {
Line 78:     private boolean fenceSucceeded = true;
Line 79:     private boolean vdsProxyFound;
Line 80:     private List<StorageDomainStatic> problematicDomains;
the list is never cleared, which is error prone and contains unneeded info 
always.
Line 81:     private boolean connectPoolSucceeded;
Line 82:     private boolean glusterHostUuidFound, glusterPeerListSucceeded, 
glusterPeerProbeSucceeded;
Line 83:     private FenceStatusReturnValue fenceStatusReturnValue;
Line 84:     private static int MAX_RETRIES_GLUSTER_PROBE_STATUS = 
Config.<Integer> getValue(ConfigValues.GlusterPeerStatusRetries);


Line 154:             runUpdateMomPolicy(getVdsGroup(), getVds());
Line 155:         } else {
Line 156:             Map<String, String> customLogValues = new HashMap<>();
Line 157:             customLogValues.put("StoragePoolName", 
getStoragePoolName());
Line 158:             if (problematicDomains != null) {
see related comment on the list decleration
Line 159:                 StringBuilder domainNames = new StringBuilder();
Line 160:                 for (StorageDomainStatic domain : problematicDomains) 
{
Line 161:                     if (domainNames.length() > 0) {
Line 162:                         domainNames.append(", ");


Line 215:             EventResult connectResult = connectHostToPool();
Line 216:             returnValue = connectResult == null ? false : 
connectResult.isSuccess();
Line 217:             connectPoolSucceeded = returnValue;
Line 218:             if (!returnValue) {
Line 219:                 problematicDomains = (List<StorageDomainStatic>) 
connectResult.getResultData();
this part isn't safe enough - if connectResult is null somehow (there's some 
protection against it in line 216..) , you'll have here NPE, we should have 
uniformity here..either it can be null or not.
Line 220:             }
Line 221:         }
Line 222:         return returnValue;
Line 223:     }


http://gerrit.ovirt.org/#/c/28859/2/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java:

Line 1398:                                             .vdsNonOperational(vdsId,
Line 1399:                                                     
NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE,
Line 1400:                                                     true,
Line 1401:                                                     domainId,
Line 1402:                                                     
Collections.singletonMap("storageDomainNames", storageDomain.getStorageName()));
In that case the audit log may be a bit misleading as the host may have 
problematic access more storage domains..let's try to make the audit log 
message clearer in that case.
Line 1403:                                 }
Line 1404:                             });
Line 1405: 
Line 1406:                             nonOpVdss.add(vdsId);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1dc385da76b6a4b0776d783c0df33fa737d206c0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to