From 83bed07d79f62e34bcfdc85a1f2c8ab141d457a3 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Tue, 19 Apr 2011 09:04:28 -0700 Subject: [PATCH] Issue 534:IndexOutOfBoundsException on problem applying options to node --- ...tOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/compute/src/main/java/org/jclouds/compute/callables/RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java b/compute/src/main/java/org/jclouds/compute/callables/RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java index b14bc49695..3f68bcb094 100644 --- a/compute/src/main/java/org/jclouds/compute/callables/RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java +++ b/compute/src/main/java/org/jclouds/compute/callables/RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java @@ -32,7 +32,6 @@ import org.jclouds.ssh.SshClient; import com.google.common.base.Function; import com.google.common.base.Predicate; -import com.google.common.collect.Iterables; import com.google.inject.assistedinject.Assisted; /** @@ -57,10 +56,10 @@ public class RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete extends Ru boolean complete = runScriptNotRunning.apply(new CommandUsingClient("./" + name + " status", ssh)); logger.debug("<< complete(%s)", complete); if (logger.isDebugEnabled() || returnVal.getExitCode() != 0) { - logger.debug("<< stdout from %s as %s@%s\n%s", name, node.getCredentials().identity, Iterables.get(node - .getPublicAddresses(), 0), ssh.exec("./" + name + " tail").getOutput()); - logger.debug("<< stderr from %s as %s@%s\n%s", name, node.getCredentials().identity, Iterables.get(node - .getPublicAddresses(), 0), ssh.exec("./" + name + " tailerr").getOutput()); + logger.debug("<< stdout from %s as %s@%s\n%s", name, ssh.getUsername(), ssh.getHostAddress(), ssh.exec( + "./" + name + " tail").getOutput()); + logger.debug("<< stderr from %s as %s@%s\n%s", name, ssh.getUsername(), ssh.getHostAddress(), ssh.exec( + "./" + name + " tailerr").getOutput()); } return returnVal; }