Alon Bar-Lev has posted comments on this change.

Change subject: core: Replace oVirt logger with slf4j in bll
......................................................................


Patch Set 5:

(17 comments)

http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVMClusterCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVMClusterCommand.java:

Line 235:             StringBuilder sb = new StringBuilder();
Line 236:             for (AffinityGroup affinityGroup : 
allAffinityGroupsByVmId) {
Line 237:                 sb.append(affinityGroup.getName() + " ");
Line 238:             }
Line 239:             log.info("Due to cluster change, removing VM from 
associated affinity group(s): {}", sb.toString());
toString
Line 240:             
DbFacade.getInstance().getAffinityGroupDao().removeVmFromAffinityGroups(vm.getId());
Line 241:         }
Line 242:         setSucceeded(true);
Line 243:     }


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java:

Line 1166:             }
Line 1167:             functionReturnValue = getSucceeded();
Line 1168:             exceptionOccurred = false;
Line 1169:         } catch (VdcBLLException e) {
Line 1170:             log.error("Command '{}' throw Vdc Bll exception. With 
error message: {}",
Command '{}' failed: {}
Line 1171:                     getClass().getName(),
Line 1172:                     e.getMessage());
Line 1173:             log.debug("Exception", e);
Line 1174:             processExceptionToClient(new VdcFault(e, 
e.getVdsError().getCode()));


Line 1173:             log.debug("Exception", e);
Line 1174:             processExceptionToClient(new VdcFault(e, 
e.getVdsError().getCode()));
Line 1175:         } catch (RuntimeException e) {
Line 1176:             processExceptionToClient(new VdcFault(e, 
VdcBllErrors.ENGINE));
Line 1177:             log.error("Command '{}' throw exception: {}", 
getClass().getName(), e.getMessage());
Command '{}' failed: {}
Line 1178:             log.error("Exception", e);
Line 1179:         } finally {
Line 1180:             if (!exceptionOccurred) {
Line 1181:                 setCommandExecuted();


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java:

Line 428:                 && 
FeatureSupported.isMemorySnapshotSupportedByArchitecture(getVm().getClusterArch(),
 getVm().getVdsGroupCompatibilityVersion());
Line 429:     }
Line 430: 
Line 431:     private void handleVdsLiveSnapshotFailure(VdcBLLException e) {
Line 432:         log.warn("Could not perform live snapshot due to error: {}. 
VM will still be configured to the new created snapshot",
Could not perform live snapshot due to error, VM will still be configured to t
he new created snapshot: {}
Line 433:                 ExceptionUtils.getMessage(e));
Line 434:         addCustomValue("SnapshotName", getSnapshotName());
Line 435:         addCustomValue("VmName", getVmName());
Line 436:         updateCallStackFromThrowable(e);


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateCloneOfTemplateCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateCloneOfTemplateCommand.java:

Line 64:                                     newDiskImage.getVolumeFormat(), 
newDiskImage.getVolumeType(),
Line 65:                                     
getDiskImage().isWipeAfterDelete(), false)));
Line 66: 
Line 67:         } catch (VdcBLLException e) {
Line 68:             log.error("Failed creating snapshot from image id -'{}'", 
getImage().getImageId());
s/-//'
Line 69:             throw e;
Line 70:         }
Line 71: 
Line 72:         if (vdsReturnValue.getSucceeded()) {


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateSnapshotCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateSnapshotCommand.java:

Line 120:                     throw new RuntimeException();
Line 121:                 }
Line 122:             }
Line 123:         } catch (Exception e) {
Line 124:             log.error("Failed creating snapshot from image id -'{}'", 
getImage().getImageId());
s/-//
Line 125:             
CommandCoordinatorUtil.logAndFailTaskOfCommandWithEmptyVdsmId(getAsyncTaskId(),
Line 126:                     "Create snapshot failed at VDSM. DB task ID is " 
+ getAsyncTaskId());
Line 127:             throw new 
VdcBLLException(VdcBllErrors.VolumeCreationError);
Line 128:         }


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExtendImageSizeCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExtendImageSizeCommand.java:

Line 92
Line 93
Line 94
Line 95
Line 96
Failed to update VM '{}' with the new volume size, VM should be restarted to 
detect the new size: {}


Line 93
Line 94
Line 95
Line 96
Line 97
stack?


Line 130
Line 131
Line 132
Line 133
Line 134
s/!//
: {} - getMessage?
stack?


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java:

Line 470:     private void handleError(VDSStatus lastStatus, final 
VDSReturnValue vdsReturnValue, FenceAgentOrder order) {
Line 471:         if (!((FenceStatusReturnValue) 
(vdsReturnValue.getReturnValue())).getIsSkipped()) {
Line 472:             // Since this is a non-transactive command , restore last 
status
Line 473:             setSucceeded(false);
Line 474:             log.error("Failed to {} VDS using {} Power Management 
agent",
'{}'?
Line 475:                     getParameters().getAction().name().toLowerCase(),
Line 476:                     order.name());
Line 477:             
AlertIfPowerManagementOperationSkipped(getParameters().getAction().name(), 
vdsReturnValue.getExceptionObject());
Line 478:             throw new 
VdcBLLException(VdcBllErrors.VDS_FENCE_OPERATION_FAILED);


Line 514:         final int UNKNOWN_RESULT_ALLOWED = 3;
Line 515:         int i = 1;
Line 516:         int j = 1;
Line 517:         boolean statusReached = false;
Line 518:         log.info("Waiting for vds {} to {}", vdsName, ACTION_NAME);
'{}'?
Line 519: 
Line 520:         // Waiting before first attempt to check the host status.
Line 521:         // This is done because if we will attempt to get host status 
immediately
Line 522:         // in most cases it will not turn from on/off to off/on and 
we will need


Line 526:         // get a proxy host to be used along the whole 
wait-for-status loop in order to prevent unnecessary delays when
Line 527:         // a potential preferred proxy host has connectivity problems 
and can not access the fenced host PM card
Line 528:         if (executor.findProxyHost()) {
Line 529:             while (!statusReached && i <= getRerties()) {
Line 530:                 log.info("Attempt {} to get vds {} status", i, 
vdsName);
'{}'?
Line 531: 
Line 532:                     VDSReturnValue returnValue = 
executor.fence(order);
Line 533:                     if (returnValue != null && 
returnValue.getReturnValue() != null) {
Line 534:                         FenceStatusReturnValue value = 
(FenceStatusReturnValue) returnValue.getReturnValue();


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HandleVdsCpuFlagsOrClusterChangedCommand.java:

Line 58:                 foundCPU = false;
Line 59:             } else {
Line 60:                 _hasFlags = false;
Line 61:             }
Line 62:             log.error("Could not find server cpu for server {}:{}, 
flags: {}", getVdsId(), getVds()
'{}'({}) (name, id)
Line 63:                     .getName(), getVds().getCpuFlags());
Line 64:         }
Line 65: 
Line 66:         // Checks whether the host and the cluster have the same 
architecture


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmFromConfigurationCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmFromConfigurationCommand.java:

Line 101:                     
vmFromConfiguration.setDiskMap(getParameters().getDiskMap());
Line 102:                     
vmFromConfiguration.setImages(getDiskImageListFromDiskMap(getParameters().getDiskMap()));
Line 103:                 }
Line 104:             } catch (OvfReaderException e) {
Line 105:                 log.error("Failed to parse a given ovf 
configuration:\n{}", ovfEntityData.getOvfData());
please add getMessage

 : {}\n{}
Line 106:                 log.error("Exception", e);
Line 107:             }
Line 108:         }
Line 109:     }


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateFromConfigurationCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateFromConfigurationCommand.java:

Line 74:                     vmTemplateFromConfiguration.setDiskList(imageList);
Line 75:                     ensureDomainMap(imageList, 
getParameters().getDestDomainId());
Line 76:                 }
Line 77:             } catch (OvfReaderException e) {
Line 78:                 log.error("Failed to parse a given ovf 
configuration:\n{}", ovfEntityData.getOvfData());
please add getMessage.

 : {}:\n{}
Line 79:                 log.error("Exception", e);
Line 80:             }
Line 81:         }
Line 82:         setVdsGroupId(getParameters().getVdsGroupId());


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateMomPolicyCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateMomPolicyCommand.java:

Line 29:                     new MomPolicyVDSParameters(getVds(), 
getVdsGroup().isEnableBallooning(),
Line 30:                                                 
getVdsGroup().isEnableKsm())
Line 31:                                               ).getSucceeded();
Line 32:         } catch (VdcBLLException e) {
Line 33:             log.error("Could not update MoM policy on host '{}'", 
getVdsName());
getMessage()?
stack?
Line 34:         }
Line 35:         getReturnValue().setSucceeded(succeeded);
Line 36:     }
Line 37: 


http://gerrit.ovirt.org/#/c/34359/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java:

Line 407:     private static Version getApplicationVersion(final String part, 
final String appName) {
Line 408:         try {
Line 409:             return new RpmVersion(part, getAppName(part, appName), 
true);
Line 410:         } catch (Exception e) {
Line 411:             log.debug("Failed to create rpm version object, part '{}' 
appName '{}', error: {}",
s/, error//
Line 412:                     part,
Line 413:                     appName,
Line 414:                     e.getMessage());
Line 415:             log.debug("Exception", e);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I82070b252197458422792c49b2135fcb9b9b1430
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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