Kobi Ianko has uploaded a new change for review.

Change subject: core: HA Vm reservation check failure event log is not well 
resolved
......................................................................

core: HA Vm reservation check failure event log is not well resolved

Making the event log message more user readable,
using the host name and not the toString.

Change-Id: I245f8eea3a955bcd8e75c574c572cf2608452d68
Bug-Url: https://bugzilla.redhat.com/1057584
Signed-off-by: Kobi Ianko <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/24246/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
index 7243fba..6953ebe 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
@@ -50,6 +50,7 @@
 
 public class SchedulingManager {
     private static Log log = LogFactory.getLog(SchedulingManager.class);
+    private static final String SEPARATOR = ", ";
     /**
      * singleton
      */
@@ -783,7 +784,18 @@
                         logable.setVdsGroupId(cluster.getId());
                         logable.addCustomValue("ClusterName", 
cluster.getName());
 
-                        String failedHostsStr = 
StringUtils.join(returnedFailedHosts, ", ");
+                        // create a string of host names
+                        final StringBuilder buf = new 
StringBuilder(returnedFailedHosts.size() * 16);
+                        for (int i = 0; i < returnedFailedHosts.size(); i++) {
+                            if (i > 0) {
+                                buf.append(SEPARATOR);
+                            }
+                            if (returnedFailedHosts.get(i) != null) {
+                                
buf.append(returnedFailedHosts.get(i).getName());
+                            }
+                        }
+                        String failedHostsStr = buf.toString();
+
                         logable.addCustomValue("Hosts", failedHostsStr);
                         AlertDirector.Alert(logable, 
AuditLogType.CLUSTER_ALERT_HA_RESERVATION);
                         log.infoFormat("Cluster: {0} fail to pass HA 
reservation check.", cluster.getName());


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I245f8eea3a955bcd8e75c574c572cf2608452d68
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to