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

cloud: add version gate for auth via assume role in AWS and GCP stora… #88594

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

rhu713
Copy link
Contributor

@rhu713 rhu713 commented Sep 23, 2022

…ge and KMS

Add a version gate for auth via assume role in AWS and GCP storage and KMS to prevent this type of auth until all nodes in the cluster has been upgraded to 22.2. The gate prevents a class of job failures where sometimes a job can succeed with assume role auth if its processors happen to all be on 22.2 nodes, but fail at times when one of its processor nodes don't support assume role. This version gate preempts the issue by preventing this type of auth until the cluster has been finalized on 22.2 and gives a better error message of why the auth cannot be used.

It's important to note that this gate does not prevent a user from creating a BACKUP job that uses assume role auth, e.g. via the DETACHED option, because the destination storage is not accessed during planning. This is inline with existing behavior for other types of auth errors, e.g. if the user enters incorrect credentials. The BACKUP job will still fail with the version gate error when it eventually executes.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rhu713 rhu713 marked this pull request as ready for review September 23, 2022 18:15
@rhu713 rhu713 requested a review from a team as a code owner September 23, 2022 18:15
@rhu713 rhu713 requested review from benbardin and removed request for a team September 23, 2022 18:15
@rhu713 rhu713 force-pushed the assume-role-gating branch 2 times, most recently from 6bd4606 to 945e19c Compare September 23, 2022 18:44
@adityamaru adityamaru self-requested a review September 23, 2022 19:16
Copy link
Contributor

@adityamaru adityamaru left a comment

Choose a reason for hiding this comment

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

LGTM, do you need a dev gen go?

…ge and KMS

Add a version gate for auth via assume role in AWS and GCP storage and KMS to
prevent this type of auth until all nodes in the cluster has been upgraded to
22.2. The gate prevents a class of job failures where sometimes a job can
succeed with assume role auth if its processors happen to all be on 22.2 nodes,
but fail at times when one of its processor nodes don't support assume role.
This version gate preempts the issue by preventing this type of auth until the
cluster has been finalized on 22.2 and gives a better error message of why the
auth cannot be used.

It's important to note that this gate does not prevent a user from creating
a BACKUP job that uses assume role auth, e.g. via the DETACHED option, because
the destination storage is not accessed during planning. This is inline with
existing behavior for other types of auth errors, e.g. if the user enters
incorrect credentials. The BACKUP job will still fail with the version gate
error when it eventually executes.

Release note: None
@rhu713
Copy link
Contributor Author

rhu713 commented Sep 27, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 27, 2022

Build succeeded:

@craig craig bot merged commit 03b8afb into cockroachdb:master Sep 27, 2022
@blathers-crl
Copy link

blathers-crl bot commented Sep 27, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from cdb0bf4 to blathers/backport-release-22.2-88594: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

3 participants