[
https://issues.apache.org/jira/browse/JCLOUDS-927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578598#comment-14578598
]
Tomas Fecko commented on JCLOUDS-927:
-------------------------------------
{code:title=usage|borderStyle=solid}
protected final Template createProviderSpecificTemplate(EInstanceType
pInstanceType, Map<String, String> pTags) {
Template template = mContext.getComputeService().templateBuilder()
.locationId(mZone)
.imageId(mImageId)
.hardwareId(mHardwarePrefix + pInstanceType.getHardwareId())
.build();
GoogleComputeEngineTemplateOptions options =
template.getOptions().as(GoogleComputeEngineTemplateOptions.class)
.autoCreateKeyPair(false)
.networks(mNetwork)
.userMetadata(pTags);
return template;
}
...
Template template =
getComputeService(pServerType).createTemplate(pServerType,
getInstanceUID(pUserUID, pInstanceCustomID), getInstancePoolUID(pUserUID,
pPoolCustomId), pInstanceCustomID, pPoolCustomId, pUserUID, pStarted);
Set<? extends NodeMetadata> nodes =
pComputeService.createNodesInGroup("librade-" +
MathUtils.getUniqueString(TWENTY), 1, template);
{code}
I think I found the cause of this. It happened, when the gce didn't have
available resources. (I wasn't aware, that this could happen :-) )
When it doesn't have the resources, it creates the instance, but the instance
is not started, it's in stopped state. Which I gues is not recognized by
jclouds 1.9.0.
When I tryied 2.0.0-SNAPSHOT, it didn't throw this exception...
> Can't start instance at gce
> ---------------------------
>
> Key: JCLOUDS-927
> URL: https://issues.apache.org/jira/browse/JCLOUDS-927
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-compute
> Affects Versions: 1.9.0
> Environment: linux
> Reporter: Tomas Fecko
> Labels: compute, gce
>
> 1 error[s]
> org.jclouds.compute.RunNodesException: error running 1 node
> group(librade-14337744044779038127) location(us-central1-a)
> image(6047445488489148610) size(4008)
> options({userMetadata={id=comla-prod-instance-1-gce-small-11,
> instance-name=gce-small-11, user-uid=1, pool-name=admin-pool,
> started-at=1433774404454, pool-id=comla-prod-pool-1-admin-pool,
> instance-type=SMALL_2}})
> Execution failures:
> 0 error[s]
> Node failures:
> 1) IllegalStateException on node
> https://www.googleapis.com/compute/v1/projects/librade-1/zones/us-central1-a/instances/librade-14337744044779038127-259:
> java.lang.IllegalStateException:
> node(https://www.googleapis.com/compute/v1/projects/librade-1/zones/us-central1-a/instances/librade-14337744044779038127-259)
> terminated
> at
> org.jclouds.compute.functions.PollNodeRunning.apply(PollNodeRunning.java:76)
> at
> org.jclouds.compute.functions.PollNodeRunning.apply(PollNodeRunning.java:42)
> at
> org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:117)
> at
> org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:142)
> at
> org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:49)
> at com.google.common.util.concurrent.Futures$2.apply(Futures.java:760)
> at
> com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:906)
> at com.google.common.util.concurrent.Futures$1$1.run(Futures.java:635)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> 1 error[s]
> at
> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:222)
> at
> org.librade.comla.components.ComlaServerManagementComponent$6.run(ComlaServerManagementComponent.java:472)
> at
> org.fabric3.execution.runtime.PropagatingRunnable.run(PropagatingRunnable.java:33)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)