[
https://issues.apache.org/jira/browse/JCLOUDS-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995295#comment-15995295
]
Paya Ashkan edited comment on JCLOUDS-1284 at 5/3/17 5:43 PM:
--------------------------------------------------------------
Sure, here is a simple code snippet to reproduce this issue:
{code:java}
private BlobStore buildBlobStore() {
BlobStoreContext blobStoreContext;
Properties properties = new Properties();
properties.setProperty(KeystoneProperties.CREDENTIAL_TYPE,
CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
properties.setProperty(LocationConstants.PROPERTY_REGION, "IAD");
ContextBuilder builder =
ContextBuilder.newBuilder("rackspace-cloudfiles-us")
.credentials("USER", "API_KEY")
.modules(ImmutableList.of(new SLF4JLoggingModule()))
.endpoint("https://identity.api.rackspacecloud.com/v2.0/")
.overrides(properties);
blobStoreContext = builder.build(BlobStoreContext.class);
return blobStoreContext.getBlobStore();
}
{code}
Upon getting the blobstore object from the above method:
{code:java}
2017-05-03T17:27:48.232+0000 [main] DEBUG o.j.rest.internal.InvokeHttpMethod -
>> invoking authenticate
2017-05-03T17:27:48.235+0000 [main] DEBUG
o.j.h.i.JavaUrlHttpCommandExecutorService - Sending request -1883728248: POST
https://identity.api.rackspacecloud.com/v2.0/tokens HTTP/1.1
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.wire - >> "Sensitive data in
payload, use jclouds.wire.log.sensitive override to enable logging this data."
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> POST
https://identity.api.rackspacecloud.com/v2.0/tokens HTTP/1.1
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Accept:
application/json
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Content-Type:
application/json
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Content-Length:
108
2017-05-03T17:27:48.904+0000 [main] DEBUG
o.j.h.i.JavaUrlHttpCommandExecutorService - Receiving response -1883728248:
HTTP/1.1 200 OK
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << HTTP/1.1 200 OK
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << X-Tenant-Id: XXXX
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << Server: nginx
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - <<
X-NewRelic-App-Data: XXXX
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << Connection:
keep-alive
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << x-trans-id: XXXX
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << Vary: Accept,
Accept-Encoding, X-Auth-Token
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << X-Node-ID: ord-05
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << Date: Wed, 03
May 2017 17:27:50 GMT
2017-05-03T17:27:48.907+0000 [main] DEBUG jclouds.headers - << Content-Type:
application/json
2017-05-03T17:27:48.907+0000 [main] DEBUG jclouds.headers - << Content-Length:
14461
2017-05-03T17:27:48.955+0000 [main] DEBUG jclouds.wire - <<
"{"access":{"serviceCatalog": ........ [huge catalog here]
2017-05-03T17:27:49.003+0000 [main] DEBUG
o.j.o.k.v.s.RegionIdToURIFromAccessForTypeAndVersion - endpoints for apiType
object-store and version 1.0: {DFW=[Endpoint ........
2017-05-03T17:27:49.005+0000 [main] WARN
o.j.l.s.i.GetRegionIdMatchingProviderURIOrNull - failed to find key for value
https://identity.api.rackspacecloud.com/v2.0/ ........ choosing first: DFW
{code}
was (Author: [email protected]):
Sure, here is a simple code snippet to reproduce this issue:
{noformat}
private BlobStore buildBlobStore() {
BlobStoreContext blobStoreContext;
Properties properties = new Properties();
properties.setProperty(KeystoneProperties.CREDENTIAL_TYPE,
CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
properties.setProperty(LocationConstants.PROPERTY_REGION, "IAD");
ContextBuilder builder =
ContextBuilder.newBuilder("rackspace-cloudfiles-us")
.credentials("USER", "API_KEY")
.modules(ImmutableList.of(new SLF4JLoggingModule()))
.endpoint("https://identity.api.rackspacecloud.com/v2.0/")
.overrides(properties);
blobStoreContext = builder.build(BlobStoreContext.class);
return blobStoreContext.getBlobStore();
}
{noformat}
Upon getting the blobstore object from the above method:
{noformat}
2017-05-03T17:27:48.232+0000 [main] DEBUG o.j.rest.internal.InvokeHttpMethod -
>> invoking authenticate
2017-05-03T17:27:48.235+0000 [main] DEBUG
o.j.h.i.JavaUrlHttpCommandExecutorService - Sending request -1883728248: POST
https://identity.api.rackspacecloud.com/v2.0/tokens HTTP/1.1
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.wire - >> "Sensitive data in
payload, use jclouds.wire.log.sensitive override to enable logging this data."
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> POST
https://identity.api.rackspacecloud.com/v2.0/tokens HTTP/1.1
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Accept:
application/json
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Content-Type:
application/json
2017-05-03T17:27:48.236+0000 [main] DEBUG jclouds.headers - >> Content-Length:
108
2017-05-03T17:27:48.904+0000 [main] DEBUG
o.j.h.i.JavaUrlHttpCommandExecutorService - Receiving response -1883728248:
HTTP/1.1 200 OK
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << HTTP/1.1 200 OK
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << X-Tenant-Id: XXXX
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << Server: nginx
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - <<
X-NewRelic-App-Data: XXXX
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << Connection:
keep-alive
2017-05-03T17:27:48.905+0000 [main] DEBUG jclouds.headers - << x-trans-id: XXXX
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << Vary: Accept,
Accept-Encoding, X-Auth-Token
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << X-Node-ID: ord-05
2017-05-03T17:27:48.906+0000 [main] DEBUG jclouds.headers - << Date: Wed, 03
May 2017 17:27:50 GMT
2017-05-03T17:27:48.907+0000 [main] DEBUG jclouds.headers - << Content-Type:
application/json
2017-05-03T17:27:48.907+0000 [main] DEBUG jclouds.headers - << Content-Length:
14461
2017-05-03T17:27:48.955+0000 [main] DEBUG jclouds.wire - <<
"{"access":{"serviceCatalog": ........ [huge catalog here]
2017-05-03T17:27:49.003+0000 [main] DEBUG
o.j.o.k.v.s.RegionIdToURIFromAccessForTypeAndVersion - endpoints for apiType
object-store and version 1.0: {DFW=[Endpoint ........
2017-05-03T17:27:49.005+0000 [main] WARN
o.j.l.s.i.GetRegionIdMatchingProviderURIOrNull - failed to find key for value
https://identity.api.rackspacecloud.com/v2.0/ ........ choosing first: DFW
{noformat}
> Region and endpoint is not respected in rackspace-cloudfiles-us
> ---------------------------------------------------------------
>
> Key: JCLOUDS-1284
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1284
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-blobstore
> Affects Versions: 2.0.0
> Reporter: Paya Ashkan
> Labels: rackspace-cloudfiles-us
> Fix For: 2.1.0
>
>
> When using rackspace-cloudfiles-us, it seems like we cannot set a desirable
> region for https://identity.api.rackspacecloud.com/v2.0/ endpoint. For
> instance, setting following parameters:
> {noformat}
> ... --provider rackspace-cloudfiles-us \
> --identity ${USER} \
> --credential ${apiKey} \
> --endpoint https://identity.api.rackspacecloud.com/v2.0/ \
> --region IAD \
> --keystone-credential-type RAX-KSKEY:apiKeyCredentials \
> ....
> {noformat}
> and running a simple listBucket command returns:
> {noformat}
> failed to find key for value https://identity.api.rackspacecloud.com/v2.0/ in
> {DFW=https://storage101.dfw1.clouddrive.com/v1/XXX,
> SYD=https://storage101.syd2.clouddrive.com/v1/XXX,
> IAD=https://storage101.iad3.clouddrive.com/v1/XXX,
> ORD=https://storage101.ord1.clouddrive.com/v1/XXX,
> HKG=https://storage101.hkg1.clouddrive.com/v1/XXX}; choosing first: DFW
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)