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

Diwaker Gupta commented on JCLOUDS-334:
---------------------------------------

Just heard back from AWS:

-------------
We allow bucket recreation in us-classic (i.e. if you do not specify location 
constraint) as long as bucket is owned by the same account. In non-us-classic 
regions we do not allow calling create again once the bucket is already created 
(response is a 409 Conflict).

I've verified this behavior using us-classic, us-west-1 and us-west-2.
Bucket recreation test responses:
- us-classic: 200 OK
- us-west-1 and us-west-2: 409 Conflict ...
  BucketAlreadyOwnedByYou       Your previous request to create the named 
bucket succeeded and you already own it.      409 Conflict    Client

Sorry for the inconsistency.  I've spoken with our S3 service team and there 
are currently no plans to change this behavior due to the negative impact 
impact it would have on customers in the us-classic region.
---------

So, we can either push my patch as-is, or I can add conditional checks for 
us-standard.

> 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)

Reply via email to