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 etcd-snapshot delete when etcd-s3 is true #8110

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

osodracnai
Copy link
Contributor

@osodracnai osodracnai commented Aug 2, 2023

Proposed Changes

This fix SURE-6362, k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

there was a select with a return statement that was returning the function and skipping the local delete logic, i put it in an anonymous function and returning only if error occurs now.

fixes #8137

Types of Changes

Verification

Testing

Linked Issues

User-Facing Change


Further Comments

@osodracnai osodracnai force-pushed the add-delete-snapshot-on-s33 branch 3 times, most recently from 0b59e84 to f9fa57b Compare August 3, 2023 20:52
@osodracnai osodracnai changed the title add test for etcd-snapshot delete on s3 fix etcd-snapshot delete when etcd-s3 is true Aug 4, 2023
@osodracnai osodracnai self-assigned this Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
@osodracnai osodracnai marked this pull request as ready for review August 4, 2023 12:56
@osodracnai osodracnai requested a review from a team as a code owner August 4, 2023 12:56
Copy link
Contributor

@johnatasr johnatasr left a comment

Choose a reason for hiding this comment

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

LGTM ! Just need fix the CI ;)

@osodracnai
Copy link
Contributor Author

merging since s390x is a knowing bug

@osodracnai osodracnai merged commit e551308 into k3s-io:master Aug 4, 2023
5 checks passed
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>

(cherry picked from commit e551308)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
osodracnai added a commit to osodracnai/k3s that referenced this pull request Aug 4, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
brandond pushed a commit that referenced this pull request Aug 5, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
brandond pushed a commit that referenced this pull request Aug 5, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
brandond pushed a commit that referenced this pull request Aug 5, 2023
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
(cherry picked from commit e551308)
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.

k3s etcd-snapshot delete fail to delete local file when called with s3 flag
3 participants