Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

Handle idempotent and BucketAlreadyOwnedByYou - #30

Merged
yehudasa merged 1 commit into
ceph:masterfrom
gaul:bucket-create-exists
Dec 18, 2015
Merged

yehudasa merged 1 commit into
ceph:masterfrom
gaul:bucket-create-exists

Conversation

@gaul

@gaul gaul commented Dec 23, 2014

Copy link
Copy Markdown
Contributor

AWS S3 has two behaviors for recreating a bucket depending if you use
the us-standard or another region:

>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 499, in create_bucket
    response.status, response.reason, body)
boto.exception.S3CreateError: S3CreateError: 409 Conflict
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>BucketAlreadyOwnedByYou</Code><Message>Your previous request to create the named bucket succeeded and you already own it.</Message><BucketName>gaul-uswest</BucketName><RequestId>24B6DC3170365CD7</RequestId><HostId>hUynMTyqc9WZFxAJ2RFK6P7BqmmeHHlMl9xL2NOy56xBUnOZCAlHqGvtMeGeAfVs</HostId></Error>

Additional discussion:

https://issues.apache.org/jira/browse/JCLOUDS-334

AWS S3 has two behaviors for recreating a bucket depending if you use
the us-standard or another region:

>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 499, in create_bucket
    response.status, response.reason, body)
boto.exception.S3CreateError: S3CreateError: 409 Conflict
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>BucketAlreadyOwnedByYou</Code><Message>Your previous request to create the named bucket succeeded and you already own it.</Message><BucketName>gaul-uswest</BucketName><RequestId>24B6DC3170365CD7</RequestId><HostId>hUynMTyqc9WZFxAJ2RFK6P7BqmmeHHlMl9xL2NOy56xBUnOZCAlHqGvtMeGeAfVs</HostId></Error>

Additional discussion:

https://issues.apache.org/jira/browse/JCLOUDS-334
yehudasa added a commit that referenced this pull request Dec 18, 2015
Handle idempotent and BucketAlreadyOwnedByYou

Reviewed-by: Yehuda Sadeh <[email protected]>
@yehudasa
yehudasa merged commit 2851e0c into ceph:master Dec 18, 2015
@gaul
gaul deleted the bucket-create-exists branch December 18, 2015 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants