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

Fix missing region error when using Firelens external config. #2356

Merged
merged 1 commit into from
Feb 17, 2020

Conversation

fenxiong
Copy link
Contributor

@fenxiong fenxiong commented Feb 12, 2020

Summary

Closes #2354.

When fetching firelens config from S3 bucket, S3's GetBucketLocation API is used to determine the region of the bucket. This API returns null for bucket in us-east-1, so we set an empty string as region of the download client, and subsequent download fails.

Fix by returning us-east-1 as region instead of empty string when the API returns null.

I didn't see this behavior of GetBucketLocation documented anywhere so I double check a few buckets in other standard regions and BJS/ZHY, seems like only us-east-1 bucket returns null.

Implementation details

See above.

Testing

Reproduced the issue, and verified that it's fixed by this pr.

Description for the changelog

Fixed a bug where Firelens container could not use config file from S3 bucket in us-east-1.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fenxiong fenxiong added this to the 1.36.3 milestone Feb 12, 2020
GetBucketLocation returns null for bucket in us-east-1. Return us-east-1 instead of null in that case.
@fenxiong fenxiong modified the milestones: 1.36.3, 1.37.0 Feb 17, 2020
@fenxiong fenxiong merged commit 34c11ed into aws:dev Feb 17, 2020
@fenxiong fenxiong deleted the bucket-fix branch February 17, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants