Alon Bar-Lev has uploaded a new change for review.

Change subject: bootstrap: reduce verbosity of errors in event log (#853962)
......................................................................

bootstrap: reduce verbosity of errors in event log (#853962)

The exact command syntax is not important to user.

The exact exception is not important to user.

Change-Id: Ie9f0042610b16af56487cb02349a399ee0f6b093
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSH.java
1 file changed, 21 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/7722/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSH.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSH.java
index 9d5e212..ef6ca57 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSH.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/VdsInstallerSSH.java
@@ -213,9 +213,8 @@
         }
         catch (Exception e) {
             String m = String.format(
-                "Could not connect to server %1$s: %2$s",
-                this.host,
-                e.getMessage()
+                "Could not connect to server %1$s",
+                this.host
             );
             log.error(m, e);
             _callbackFailed(m);
@@ -403,14 +402,20 @@
             }
         }
         catch (Exception e) {
-            String m = String.format(
-                "SSH error running command %1$s '%2$s': %3$s",
-                this.host,
-                command,
-                e.getMessage()
+            log.error(
+                String.format(
+                    "SSH error running command %1$s:'%2$s'",
+                    this.host,
+                    command
+                ),
+                e
             );
-            log.error(m, e);
-            _callbackFailed(m);
+            _callbackFailed(
+                String.format(
+                    "SSH command failed while executing at host '%1$s', refer 
to logs for further information",
+                    this.host
+                )
+            );
         }
 
         log.debug("executeCommand leave " + ret);
@@ -434,22 +439,20 @@
         }
         catch (FileNotFoundException e) {
             String m = String.format(
-                "SSH could not receive file %1$s:'%2$s': '%3$s': %4$s",
+                "SSH could not receive file %1$s:'%2$s': '%3$s'",
                 this.host,
                 source,
-                destination,
-                e.getMessage()
+                destination
             );
             log.error(m, e);
             _callbackFailed(m);
         }
         catch (Exception e) {
             String m = String.format(
-                "SSH could not receive file %1$s:'%2$s': '%3$s': %4$s",
+                "SSH could not receive file %1$s:'%2$s': '%3$s'",
                 this.host,
                 source,
-                destination,
-                e.getMessage()
+                destination
             );
             log.error(m, e);
             _callbackAddError(m);
@@ -484,11 +487,10 @@
         }
         catch (Exception e) {
             String m = String.format(
-                "SSH could not send file %2$s %1$s:%3$s: %4$s",
+                "SSH could not send file %2$s %1$s:%3$s",
                 this.host,
                 source,
-                destination,
-                e.getMessage()
+                destination
             );
             log.error(m, e);
             _callbackAddError(m);


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

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

Reply via email to