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: s3 bucket in us-east-1 should not set location constraint #4839

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

mtulio
Copy link
Contributor

@mtulio mtulio commented Mar 1, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

The following error is raised when creating a cluster in us-east-1:

E0229 16:32:03.857522 2077184 co[1]ntroller.go:329] "Reconciler error" err=<
	failed to reconcile S3 Bucket for AWSCluster openshift-cluster-api-guests/mrb-capa-00-gr9m7: ensuring bucket exists: creating S3 bucket: InvalidLocationConstraint: The specified location-constraint is not valid
		status code: 400, request id: 3QSJFBYM9H60N3D6, host id: 
 > controller="awscluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AWSCluster" AWSCluster="openshift-cluster-api-guests/mrb-capa-00-gr9m7" namespace="openshift-cluster-api-guests" name="mrb-capa-00-gr9m7" reconcileID="f6b8a66c-108b-4988-9047-0151511fb5bd" 

The location constraint must be null when creating buckets in the region us-east-1.

"Buckets in Region us-east-1 have a LocationConstraint of null."[1]

[1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html#API_GetBucketLocation_ResponseSyntax

Which issue(s) this PR fixes

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

Skip location constraint configuration when creating a bucket on `us-east-1`.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 1, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @mtulio!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 1, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mtulio. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mtulio mtulio changed the title WIP | 🐛 fix: s3 bucket in us-east-1 should not set locations 🐛 fix: s3 bucket in us-east-1 should not set locations Mar 1, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 1, 2024
@mtulio mtulio force-pushed the CORS-3285-fix-s3-loc-use1 branch from 7d58d7f to 3442f78 Compare March 1, 2024 00:30
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 1, 2024
@Ankitasw
Copy link
Member

Ankitasw commented Mar 1, 2024

@mtulio thanks for this PR. This has not yet caught in our CI coz CI uses region=us-west-2
Could you update the release notes so that we can merge this PR?

@Ankitasw Ankitasw added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 1, 2024
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 1, 2024
@mtulio mtulio force-pushed the CORS-3285-fix-s3-loc-use1 branch from 3442f78 to 43bded1 Compare March 1, 2024 11:53
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 1, 2024
@mtulio mtulio changed the title 🐛 fix: s3 bucket in us-east-1 should not set locations 🐛 fix: s3 bucket in us-east-1 should not set location constraint Mar 1, 2024
@mtulio
Copy link
Contributor Author

mtulio commented Mar 1, 2024

PTAL?
/assign @vincepri @Ankitasw

@vincepri
Copy link
Member

vincepri commented Mar 1, 2024

/ok-to-test

what an edge case 😄

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2024
@k8s-ci-robot k8s-ci-robot merged commit 77aed2a into kubernetes-sigs:main Mar 1, 2024
21 checks passed
@mtulio mtulio deleted the CORS-3285-fix-s3-loc-use1 branch March 1, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants