jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignasi Barrera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-923) NovaComputeServiceAdapter.listImages fails if any zone API fails
Date Tue, 09 Jun 2015 07:45:00 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578497#comment-14578497

Ignasi Barrera commented on JCLOUDS-923:

Listing images can be an expensive operation in some providers, and jclouds caches it the
first time the list is requested. This is done regardless of the options passed to the template
builder, as it could be used several times to create nodes in different locations.

The zones being considered by jclouds, however, can be configured using the {{LocationConstants.PROPERTY_ZONES}}
property when creating the context. That way jclouds will only consider those zones and ignore
the rest. In Rackspace all zones [are enabled by default|https://github.com/jclouds/jclouds/blob/jclouds-1.8.0/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java#L66],
but you can change that value when creating the context to something like:

Properties overrides = new Properties();
overrides.put(LocationConstants.PROPERTY_ZONES, "IAD");

That should work for you. Could you try setting that property and confirm that it works as

(Also note that in 1.9.0 the naming in Rackspace has changed from "zone" to "region" and the
property to be used is the {{LocationConstants.PROPERTY_REGION}}).

> NovaComputeServiceAdapter.listImages fails if any zone API fails
> ----------------------------------------------------------------
>                 Key: JCLOUDS-923
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-923
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.8.0
>         Environment: Ubuntu 14.04 x64, OpenJDK 7, Rackspace cloud
>            Reporter: Jonathan Cobb
> I have an integration test that launches an instance, runs a simple echo command on it
to ensure SSH is working, then destroys the instance.
> This test passes for EC2 and DigitalOcean, and until yesterday it also passed for Rackspace.
Today it is failing. I have tracked down the error to NovaComputeServiceAdapter.listImages
> In my test, I call TemplateBuilder.build to create a Template, then use that Template
in a call to ComputeService.createNodesInGroup to create a node based on the template.
> Within TemplateBuider.build, it calls NovaComputeServiceAdapter.listImages and iterates
over each zone to get a list of images for each zone. 
> [Side question-- why does the TemplateBuilder look up all images for all zones, even
though I have already configured it to use a particular zone (in this case, "IAD")?]
> In any case, even though I am trying to launch in IAD, the call to the SYD zone is failing
(today, was working yesterday), and thus no instances can be launched at all, since the resulting
HttpResponseException is uncaught and bubbles all the way up and out of TemplateBuilder.build.
The full stack trace is here: http://cloudstead.io/downloads/jclouds-exception.txt
> I have made a simple patch that catches the HttpResponseException, logs an error, and
continues loading images from other zones. The patch is here: http://cloudstead.io/downloads/NovaComputeServiceAdapter.java.patch

This message was sent by Atlassian JIRA

View raw message