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

[release-1.25] Fix etcd snapshot S3 issues #8939

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

brandond
Copy link
Member

Proposed Changes

Backport of #8926

  • Don't apply s3 retention if S3 client failed to initialize
  • Don't request metadata when listing objects
    While some implementations may support it, it appears that most don't, and some may in fact return an error if it is requested. We already stat the object to get the metadata anyway, so this was unnecessary if harmless on most implementations.
  • Print key instead of file path in snapshot metadata log message

Types of Changes

bugfix

Verification

See linked issues

Testing

Linked Issues

User-Facing Change

Don't apply S3 retention if S3 client failed to initialize
Don't request metadata when listing S3 snapshots
Print key instead of file path in snapshot metadata log message

Further Comments

While some implementations may support it, it appears that most don't,
and some may in fact return an error if it is requested.

We already stat the object to get the metadata anyway, so this was
unnecessary if harmless on most implementations.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond requested a review from a team as a code owner November 21, 2023 21:41
Copy link

@VestigeJ VestigeJ left a comment

Choose a reason for hiding this comment

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

LGTM

@brandond brandond merged commit c816598 into k3s-io:release-1.25 Nov 22, 2023
13 of 14 checks passed
@brandond brandond deleted the fix-s3-crash_release-1.25 branch June 6, 2024 21: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.

3 participants