jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Shoemaker <ryan.shoema...@enterprisedb.com>
Subject warning during BlobStore.getBlobStore()
Date Thu, 13 Apr 2017 22:28:22 GMT
Hi,

I've been seeing this warning pop out of my code for awhile and have 
finally gotten around to investigating it:

org.jclouds.location.suppliers.implicit.GetRegionIdMatchingProviderURIOrNull|_ThreadID=10;_ThreadName=Thread-2;|failed

to find key for value http://keystone.domainname.com:5000/v2.0 in 
{uk=http://swift.domainname.com:8080/v1/AUTH_813b8f3ec69a460caf6efc2ea32bafb8}; 
choosing first: uk

Why is there a mismatch between the uri and what's in the map?  The uri 
is pointing to our keystone service and the map contains our swift 
service.  The actual log message appears to be coming from:

    org.jclouds.suppliers.SupplyKeyMatchingValueOrNull.get()

As I was debugging this, I noticed this code on the stack:

    org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get()
    (line 150) @Override
    public T get() {
        try {
           return cache.get("FOO").orNull();
        }catch (UncheckedExecutionException e) {
           throw propagate(e.getCause());
        }catch (ExecutionException e) {
           throw propagate(e.getCause());
        }
    }

What's going on with that key name? Here's the calling code in my app - 
we have a method to get the storage context:

    public BlobStoreContext getStorageContext(@Nullable String tenant) {
         String providerOrApi = ProviderFactory.getSupportedProviderFromId(
             user.getServiceProvider()).getObjectStorageProvider();
         Properties overrides =new Properties();overrides.setProperty(KeystoneProperties.CREDENTIAL_TYPE,
CredentialTypes.PASSWORD_CREDENTIALS);
         
         ContextBuilder builder = ContextBuilder.newBuilder(providerOrApi)
             .credentials(tenant +":" +serviceLogin,servicePassword)
             .endpoint(identityServiceEndpoint)
             .modules(ImmutableSet.of(new JDKLoggingModule(),new JschSshClientModule()))
             .overrides(overrides);

         return builder.buildView(BlobStoreContext.class);
    }

And then code grabs the context and calls getBlobStore() on it - this is 
what causes the warning to be printed:

    BlobStoreContext storageContext = getStorageContext(firstTenant);
    if (storageContext !=null) {
    BlobStore blobStore = storageContext.getBlobStore();
         etc...

We're running jclouds 2.0.0 on OpenStack.  Despite the warning, 
everything appears to work fine. Thanks! --Ryan

Mime
View raw message