[
https://issues.apache.org/jira/browse/JCLOUDS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790726#comment-13790726
]
Diwaker Gupta commented on JCLOUDS-334:
---------------------------------------
AFAICT, AWS documentation is broken or S3 is buggy. I got wire traces from boto
for creating the same container twice:
{noformat}
PUT / HTTP/1.1
Host: diwaker-blobstore9.s3.amazonaws.com
Accept-Encoding: identity
Date: Wed, 09 Oct 2013 19:00:15 GMT
Content-Length: 0
Authorization: AWS AKIAJPBNMBGELBDRYUVQ:2XuR3SaDfYWLIlG1gaW0ymG0M4w=
User-Agent: Boto/2.9.8 (darwin)
HTTP/1.1 200 OK
x-amz-id-2: wvFx1h3zgp/l2dobf/IcFwSiDgkL1jcFHZkI7seWJMVy2V0XmAeq+SAXMqNRM8hv
x-amz-request-id: 9CCB9E5249B7C283
Date: Wed, 09 Oct 2013 19:00:17 GMT
Location: /diwaker-blobstore9
Content-Length: 0
Server: AmazonS3
PUT / HTTP/1.1
Host: diwaker-blobstore9.s3.amazonaws.com
Accept-Encoding: identity
Date: Wed, 09 Oct 2013 19:00:21 GMT
Content-Length: 0
Authorization: AWS AKIAJPBNMBGELBDRYUVQ:VO+CYeoHcZOTKmEWktJ342/zA70=
User-Agent: Boto/2.9.8 (darwin)
HTTP/1.1 200 OK
x-amz-id-2: apBn552Ath0eP9MWXZxKvF+VQSP+6yk0KwdlHrExzMDbgX59sBGOI67L+c3+dFU2
x-amz-request-id: AC02D0C2A0F30E90
Date: Wed, 09 Oct 2013 19:00:22 GMT
Location: /diwaker-blobstore9
Content-Length: 0
Server: AmazonS3
{noformat}
> createContainerInLocation returns true even if container exists
> ---------------------------------------------------------------
>
> Key: JCLOUDS-334
> URL: https://issues.apache.org/jira/browse/JCLOUDS-334
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-blobstore
> Affects Versions: 1.6.2
> Reporter: Diwaker Gupta
> Assignee: Andrew Gaul
>
> Javadocs for `createContainerInLocation` state (from
> http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/BlobStore.html):
> "Returns: true if the container was created, false if it already existed."
> The following simple test snippet verifies this:
> ```
> assertThat(blobStore.createContainerInLocation(
> /*location=*/ null, name)).isTrue();
> assertTrue(blobStore.containerExists(name));
> assertThat(blobStore.createContainerInLocation(
> /*location=*/ null, name)).isFalse();
> ```
> I ran the test above for a variety of blobstores, and the test fails for
> pretty much everyblobstore including aws-s3, cloudfiles, hpcloud, azureblob,
> atmos etc. In my tests, it does pass when using generic S3 endpoints like
> with Google cloud storage.
--
This message was sent by Atlassian JIRA
(v6.1#6144)