Simone created JCLOUDS-1527:
-------------------------------

             Summary: Azure compute rate limit exceeded exception during the 
build of image cache
                 Key: JCLOUDS-1527
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1527
             Project: jclouds
          Issue Type: Bug
          Components: jclouds-compute
    Affects Versions: 2.1.3
            Reporter: Simone


Here the exception:

{noformat}
org.jclouds.azurecompute.arm.exceptions.AzureComputeRateLimitExceededException: 
HTTP/1.1 429 
{}
    at 
org.jclouds.azurecompute.arm.handlers.AzureComputeErrorHandler.handleError(AzureComputeErrorHandler.java:79)
    at 
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
    at 
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)
    at 
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)
    at 
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
    at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
    at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
    at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
    at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:84)
    at com.sun.proxy.$Proxy267.getVersion
    at 
org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter.getImagesFromPublisher(AzureComputeServiceAdapter.java:212)
    at 
org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter.listImagesByLocation(AzureComputeServiceAdapter.java:226)
    at 
org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter.listImages(AzureComputeServiceAdapter.java:255)
    at 
org.jclouds.compute.config.ComputeServiceAdapterContextModule$2.get(ComputeServiceAdapterContextModule.java:121)
    at 
org.jclouds.compute.config.ComputeServiceAdapterContextModule$2.get(ComputeServiceAdapterContextModule.java:118)
    at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:75)
    at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:57)
    at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3628)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)
    at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2295)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2208)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4053)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4057)
    at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4986)
    at 
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:150)
    at 
org.jclouds.compute.suppliers.ImageCacheSupplier.get(ImageCacheSupplier.java:106)
    at 
org.jclouds.compute.domain.internal.TemplateBuilderImpl.getImages(TemplateBuilderImpl.java:853)
    at 
org.jclouds.compute.domain.internal.TemplateBuilderImpl.build(TemplateBuilderImpl.java:665)
{noformat}

I use the Azure passing the imageId to template builder, I think that the cache 
is not usefull in my case, but passing the override parameter: 
"jclouds.azurecompute.arm.publishers" to empty string breaks line: 666 (:p) in 
TemplateBuilderImpl
"checkState(!images.isEmpty(), "no images present!");"

Can I make a PR to change that line with: "!images.isEmpty() && imageId != 
null" do you think it could be safe?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to