jclouds / legacy-jclouds-cli

https://jclouds.apache.org
Apache License 2.0
17 stars 5 forks source link

jclouds node create (etc) fails with stacktrace, but node is actually created #8

Open abayer opened 12 years ago

abayer commented 12 years ago

Seems to be related to the credential store stuff. This is while using environment variables for the api/endpoint/identity/credential, but I also tried with the env vars wiped and specifying the arguments explicitly with the same result:

[abayer@stuttgart jclouds-cli]$ jclouds node create --imageId=8888d241-697d-4267-86e6-ae80f72d4058 --hardwareId=2dfe6308-dc52-4a8f-9934-0bed5ac64ff0 apb-cli-testFailed to create nodes:error running 1 node group(apb-cli-test) location(7dbc4787-ec2f-498d-95f0-848c8c81e5da) image(8888d241-697d-4267-86e6-ae80f72d4058) size(2dfe6308-dc52-4a8f-9934-0bed5ac64ff0) options({}) Execution failures:

1) ExecutionException on apb-cli-test-504: java.util.concurrent.ExecutionException: java.lang.NullPointerException at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111) at org.jclouds.concurrent.FutureIterables$1.run(FutureIterables.java:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at org.jclouds.karaf.services.modules.PropertiesCredentialStore$PropertiesBacking.put(PropertiesCredentialStore.java:146) at org.jclouds.karaf.services.modules.PropertiesCredentialStore$PropertiesBacking.put(PropertiesCredentialStore.java:55) at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.createNodeWithGroupEncodedIntoName(AdaptingComputeServiceStrategies.java:191) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:82) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:66) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.createNodeInGroupWithNameAndTemplate(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:170) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:125) at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:213) at org.jclouds.karaf.commands.compute.NodeCreateCommand.doExecute(NodeCreateCommand.java:140) at org.jclouds.karaf.commands.compute.ComputeCommandSupport.execute(ComputeCommandSupport.java:98) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) at org.jclouds.cli.runner.Main.run(Main.java:148) at org.jclouds.cli.runner.Main.run(Main.java:90) at org.jclouds.cli.runner.Main.main(Main.java:65) at org.jclouds.concurrent.config.DescribingExecutorService.submit(DescribingExecutorService.java:89) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.createNodeInGroupWithNameAndTemplate(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:170) at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:125) at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:213) at org.jclouds.karaf.commands.compute.NodeCreateCommand.doExecute(NodeCreateCommand.java:140) at org.jclouds.karaf.commands.compute.ComputeCommandSupport.execute(ComputeCommandSupport.java:98) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) at org.jclouds.cli.runner.Main.run(Main.java:148) at org.jclouds.cli.runner.Main.run(Main.java:90) at org.jclouds.cli.runner.Main.main(Main.java:65)

1 error[s] Node failures:

0 error[s] java.lang.NullPointerException at org.jclouds.karaf.commands.compute.NodeCreateCommand.doExecute(NodeCreateCommand.java:150) at org.jclouds.karaf.commands.compute.ComputeCommandSupport.execute(ComputeCommandSupport.java:98) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) at org.jclouds.cli.runner.Main.run(Main.java:148) at org.jclouds.cli.runner.Main.run(Main.java:90) at org.jclouds.cli.runner.Main.main(Main.java:65)

abayer commented 12 years ago

Ah, this might be because I have JCLOUDS_USER and JCLOUDS_PASSWORD set in the environment as well...

abayer commented 12 years ago

Hrm, no...but the credentials.identity from right before the NPE is "root" for some reason.

abayer commented 12 years ago

Ok, is this happening because when I create a node, I'm not actually getting credentials to speak of back from CloudStack?

abayer commented 12 years ago

This is definitely because of PropertiesCredentialStore - when I remove it from the context builder, everything works fine.