summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-08-19 19:08:22 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-08-19 19:08:22 +0530
commite91b51032948ef7e10c0a91de1f72635c1b0d04d (patch)
tree4228288d866b1408a54e5c367f66fb8cb01a1a3d /src
parent4cd6308ec21edf3a7e48e84bd98bbceb80e18ac5 (diff)
Added extra log messages
Diffstat (limited to 'src')
-rw-r--r--src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java
index a5735cae..3399dc3b 100644
--- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java
+++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java
@@ -334,6 +334,7 @@ public class SshUtil {
* @return Result of remote execution
*/
public ProcessResult executeRemoteWithPassword(String serverName, String command) {
+ logger.info("Executing command [" + command + "] on server [" + serverName + "] with default password.");
Connection conn = getConnectionWithPassword(serverName);
ProcessResult result = executeCommand(conn, command);
// we don't cache password based connections. hence the connection must be closed.
@@ -366,8 +367,10 @@ public class SshUtil {
*/
public ProcessResult executeRemote(String serverName, String command) {
try {
+ logger.info("Executing command [" + command + "] on server [" + serverName + "] with public key authentication");
return executeRemoteWithPubKey(serverName, command);
} catch(ConnectionException e) {
+ logger.warn("Couldn't execute command with public key authentication, will try with default password.", e);
// Couldn't connect with public key. Try with default password.
return executeRemoteWithPassword(serverName, command);
}