Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.8.1
-
None
Description
As per workaround in https://issues.apache.org/jira/browse/JCLOUDS-777?focusedCommentId=14214117&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14214117
An exception is raised while using the TemplateBuilder, even if locationId is set to an allowed jclouds.regions.
It looks like it is trying to search images across all regions, even with locationId set to one of the defined jclouds.regions.
10:22:27.866 [pool-39-thread-1] WARN jclouds.compute - Error parsing images in query virtualization-type=hvm;architecture=x86_64;owner-id=137112412989,099720109477;hypervisor=xen;state=available;image-type=machine;root-device-type=ebs java.util.concurrent.ExecutionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: requested location us-west-2, which is not in the configured locations: {eu-west-1=Suppliers.ofInstance(https://ec2.eu-west-1.amazonaws.com), us-east-1=Suppliers.ofInstance(https://ec2.us-east-1.amazonaws.com)} at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.7.0_65] at java.util.concurrent.FutureTask.get(FutureTask.java:188) [na:1.7.0_65] at org.jclouds.aws.ec2.compute.suppliers.AWSEC2ImageSupplier.get(AWSEC2ImageSupplier.java:99) [aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] at org.jclouds.aws.ec2.compute.suppliers.AWSEC2ImageSupplier.get(AWSEC2ImageSupplier.java:57) [aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:73) [jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:57) [jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:na] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:na] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:na] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:na] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:na] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:na] at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:119) [jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.compute.suppliers.ImageCacheSupplier.get(ImageCacheSupplier.java:64) [jclouds-compute-1.8.2-20141117.032446-21.jar:1.8.2-SNAPSHOT] at org.jclouds.ec2.compute.internal.EC2TemplateBuilderImpl.getImages(EC2TemplateBuilderImpl.java:113) [ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at org.jclouds.compute.domain.internal.TemplateBuilderImpl.build(TemplateBuilderImpl.java:681) [jclouds-compute-1.8.2-20141117.032446-21.jar:1.8.2-SNAPSHOT] Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: requested location us-west-2, which is not in the configured loc ations: {eu-west-1=Suppliers.ofInstance(https://ec2.eu-west-1.amazonaws.com), us-east-1=Suppliers.ofInstance(https://ec2.us-east-1.amazonaws.com)} at com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1437) ~[guava-17.0.jar:na] at com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1423) ~[guava-17.0.jar:na] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel.apply(DescribeImagesParallel.java:80) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at org.jclouds.aws.ec2.compute.suppliers.CallForImages.call(CallForImages.java:79) ~[aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] at org.jclouds.aws.ec2.compute.suppliers.CallForImages.call(CallForImages.java:45) ~[aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] at java.lang.Thread.getStackTrace(Thread.java:1589) [na:1.7.0_65] at org.jclouds.aws.ec2.compute.suppliers.AWSEC2ImageSupplier.images(AWSEC2ImageSupplier.java:138) [aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] ... 32 common frames omitted Caused by: java.lang.IllegalArgumentException: requested location us-west-2, which is not in the configured locations: {eu-west-1=Suppliers.ofInstance(https://ec2.eu-west-1.a mazonaws.com), us-east-1=Suppliers.ofInstance(https://ec2.us-east-1.amazonaws.com)} at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148) ~[guava-17.0.jar:na] at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:60) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-S NAPSHOT] at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:37) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-S NAPSHOT] at org.jclouds.rest.internal.RestAnnotationProcessor.getEndpointInParametersOrNull(RestAnnotationProcessor.java:495) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.RestAnnotationProcessor.getEndpointFor(RestAnnotationProcessor.java:518) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.RestAnnotationProcessor.findEndpoint(RestAnnotationProcessor.java:370) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:192) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:129) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:188) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:84) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117) ~[jclouds-core-1.8.2-20141117.032236-21.jar:1.8.2-SNAPSHOT] at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) ~[guava-17.0.jar:na] at com.sun.proxy.$Proxy359.describeImagesInRegion(Unknown Source) ~[na:na] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel$1$1.call(DescribeImagesParallel.java:73) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel$1$1.call(DescribeImagesParallel.java:70) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] at java.lang.Thread.getStackTrace(Thread.java:1589) [na:1.7.0_65] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel$1.apply(DescribeImagesParallel.java:70) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel$1.apply(DescribeImagesParallel.java:67) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at com.google.common.collect.Iterators$8.transform(Iterators.java:794) ~[guava-17.0.jar:na] at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:301) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableList$Builder.addAll(ImmutableList.java:691) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:275) ~[guava-17.0.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226) ~[guava-17.0.jar:na] at com.google.common.util.concurrent.Futures.allAsList(Futures.java:987) ~[guava-17.0.jar:na] at org.jclouds.ec2.compute.strategy.DescribeImagesParallel.apply(DescribeImagesParallel.java:63) ~[ec2-1.8.2-20141117.033033-21.jar:1.8.2-SNAPSHOT] at org.jclouds.aws.ec2.compute.suppliers.CallForImages.call(CallForImages.java:79) ~[aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] at org.jclouds.aws.ec2.compute.suppliers.CallForImages.call(CallForImages.java:45) ~[aws-ec2-1.8.2-20141117.034410-21.jar:1.8.2-SNAPSHOT] ... 4 common frames omitted