Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading from v2.8.0 to v2.9.0 on S3 causes BucketAlreadyOwnedByYou error #173

Closed
bacongobbler opened this issue Dec 2, 2016 · 0 comments · Fixed by #176
Closed

upgrading from v2.8.0 to v2.9.0 on S3 causes BucketAlreadyOwnedByYou error #173

bacongobbler opened this issue Dec 2, 2016 · 0 comments · Fixed by #176
Assignees
Milestone

Comments

@bacongobbler
Copy link
Member

In v2.8.0 and in previous versions, we erroneously created the database bucket in the default us-east-1 region regardless of the set region. In v2.9.0 we corrected this, but when you upgrade from v2.8.0 to v2.9.0 you are greeted with this error:

/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/002_create_bucket.sh
Traceback (most recent call last):
  File "/bin/create_bucket", line 28, in <module>
    conn.create_bucket(bucket_name, location=region)
  File "/usr/local/lib/python3.5/dist-packages/boto/s3/connection.py", line 624, 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>workflow-database-29</BucketName><RequestId>B949AE55E09300BE</RequestId><HostId>7vVUWxtbxxrSBKPEqPQnzdFFCnMdC4mmLrCnKmbU05nz4tjcdk/BWSGATVuFoUN9sO/It4sH9X4=</HostId></Error>

This is because the bucket lookup code now logs into the specified region, and becuase it is not there it is not found. When boto attempts to create the bucket, it is met with this error because the bucket already exists in another region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants