Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.7.3
Description
We create our template as follows:
val templateBuilder = context.getComputeService.templateBuilder()
val template = templateBuilder.imageId(request.image)
.hardwareId(s"${request.zone}/${request.machineType}")
.locationId(request.zone)
.options(options.overrideLoginPrivateKey(Main.conf.privateKeyString))
.options(options.overrideLoginUser(request.sshUserName))
.options(options.authorizePublicKey(Main.conf.publicKeyString))
.build())
And instantiate nodes like this:
val node = computeService.createNodesInGroup(name, 1, template)
However, the presence of the authorizePublicKey option causes an exception to be thrown when we call createNodesInGroup:
2014-08-13 01:35:55,810 ERROR [pool-3-thread-3] j.compute [SLF4JLogger.java:96] << problem customizing node(asia-east1-c/almost-nothing-bef): org.jclouds.rest.AuthorizationException: (jclouds:rsa[fingerprint(91:ed:0b:d9:18:4b:23:5f:7e:dc:7d:5b:0f:b7:c4:f5),sha1(66:3e:a9:48:67:1f:a5:0d:00:23:41:58:ce:37:d3:2d:fd:17:64:63)]@107.167.191.8:22) (jclouds:rsa[fingerprint(91:ed:0b:d9:18:4b:23:5f:7e:dc:7d:5b:0f:b7:c4:f5),sha1(66:3e:a9:48:67:1f:a5:0d:00:23:41:58:ce:37:d3:2d:fd:17:64:63)]@107.167.191.8:22) error acquiring {hostAndPort=107.167.191.8:22, loginUser=jclouds, connectTimeout=60000, sessionTimeout=60000}: Auth fail at org.jclouds.ssh.jsch.JschSshClient.propagate(JschSshClient.java:335) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.ssh.jsch.JschSshClient.acquire(JschSshClient.java:187) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.ssh.jsch.JschSshClient.connect(JschSshClient.java:200) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.call(RunScriptOnNodeAsInitScriptUsingSsh.java:76) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:125) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:146) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:53) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at com.google.common.util.concurrent.Futures$1.apply(Futures.java:711) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:849) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_05] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_05] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05] Caused by: com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:491) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.ssh.jsch.SessionConnection.create(SessionConnection.java:186) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.ssh.jsch.SessionConnection.create(SessionConnection.java:39) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] at org.jclouds.ssh.jsch.JschSshClient.acquire(JschSshClient.java:180) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na] ... 10 common frames omitted