Thanks Ignasi! That property override seems to do the trick! Cheers,
David On 9 February 2015 at 09:07, Ignasi Barrera <[email protected]> wrote: > Hi! > > This is a known issue. See JCLOUDS-540 [1]. > > In your case, you should be able to limit the regions jclouds is > connecting by setting the "jclouds.regions" property when creating the > context. Something like the following should work: > > Properties overrides = new Properties(); > overrides.setProperty(LocationConstants.PROPERTY_REGIONS, Region.EU_WEST_1); > > ComputeServiceContext ctx = ContextBuilder.newBuilder("aws.ec2") > .overrides(overrides) > (...) > .buildView(ComputeServiceContext.class); > > > HTH! > > I. > > > [1] https://issues.apache.org/jira/browse/JCLOUDS-540 > > On 8 February 2015 at 21:24, David Bosschaert > <[email protected]> wrote: >> Thanks Giovanni. At least moving my DNS setting to an alternative one >> gets around the problem. I'm still wondering whether it's a good idea >> that jclouds contacts all the regions (and the whole thing fails when >> one of the machines in a region that I don't care about isn't >> accessible). Maybe I should look at the code in more detail and >> provide a patch ;) >> >> Cheers, >> >> David >> >> On 8 February 2015 at 14:44, Giovanni Toraldo <[email protected]> wrote: >>> On Sun, Feb 8, 2015 at 12:22 PM, David Bosschaert >>> <[email protected]> wrote: >>>> It happens irregularly (but quite often) the thing I don't understand is >>>> why >>>> it even tries to connect to a host in the Asia - pacific region when I >>>> explicitly say 'eu-west-1'? >>> >>> As far as I can understand, jclouds needs to fill-up some structures >>> with fresh information from EC2 API before doing anything (and after >>> the cache TTL expire), iterating over every available region, even if >>> you are actually using one particular region at a time. >>> >>> Maybe your ISP DNS servers are a little flaky or overloaded; can you >>> try to use on your machine OpenDNS (208.67.220.220, 208.67.222.222) or >>> Google DNS (8.8.8.8, 8.8.4.4)? It may helps. >>> >>> Cheers, >>> >>> -- >>> Giovanni Toraldo >>> http://gionn.net
