-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix(create_bucket): try default s3 region on create error #176
Conversation
@kmala and @paulczar are potential reviewers of this pull request based on my analysis of |
Nice! I'll test now. You can squash or remove the first commit to clean it up--this is much simpler. |
I figured I'd keep your commit in there for credit :) I shall do so now. |
fwiw I just manually tested this on an upgrade from v2.8.0 to v2.9.0 + this image and it seems to be working for me. |
I also tested on a broken upgraded S3 cluster and this seems to do the trick. Wal-e found its backup and everything recovered (after flapping for two hours with my previous attempt at fixing this). |
if region != 'us-east-1': | ||
print('Failed to create bucket in {}. We are now assuming that the bucket was created in us-east-1.'.format(region)) | ||
with open(os.path.join(os.environ['WALE_ENVDIR'], "WALE_S3_ENDPOINT"), "w+") as file: | ||
file.write('https+path://s3.amazonaws.com:443') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should re raise the error if the region is us-east-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point.
0fd4291
to
8bf4c52
Compare
I'm going to go ahead and merge this as two of us have manually tested these changes and everything works as intended. CI's breaking due to unrelated changes. |
continuation of #175. If we fail to create the bucket in the specified region, it means the user has created the bucket in us-east-1 (see #173). We can then assume that we want wal-e to connect to said bucket in us-east-1. I've added a note that we'll want to remove this code once we drop support for v2.8.0 and earlier versions.
closes #173
closes #175