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.26] - Fix for cluster-reset backup from s3 when etcd snapshots are disabled #8170

Conversation

vitorsavian
Copy link
Member

Proposed Changes

If cluster-reset was called with etcd-disable-snapshots , k3s will verify if the user have etcd-s3 and then restore the snapshot from S3.

Types of Changes

Verification

Create a config.yaml in the /etc/rancher/k3s with this flags

cluster-init: true
etcd-disable-snapshots: true
etcd-s3: true
etcd-s3-access-key: 'secretKey'
etcd-s3-secret-key: 'secretKey'
etcd-s3-bucket: 'bucketName'
etcd-s3-region: 'awsRegion'
etcd-s3-timeout: '90s'

Now you can create the server

k3s server 

Then you need to save the snapshot, that will backup to s3

k3s etcd-snapshot save

Turn off the k3s and then

k3s server --cluster-reset --cluster-reset-restore-path="s3SnapshotName"

Testing

Linked Issues

User-Facing Change


Further Comments

With this change, users can now manage and backup their own snapshots on demand from S3.

…k3s-io#8155)

* Fixed when the user disable the etcd snapshots, but want to backup from s3

Signed-off-by: Vitor <[email protected]>
@vitorsavian vitorsavian requested a review from a team as a code owner August 10, 2023 17:23
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (52e2c08) 19.51% compared to head (737ced3) 19.51%.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-1.26    #8170   +/-   ##
=============================================
  Coverage         19.51%   19.51%           
=============================================
  Files                83       83           
  Lines              5597     5597           
=============================================
  Hits               1092     1092           
  Misses             4279     4279           
  Partials            226      226           
Flag Coverage Δ
unittests 19.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vitorsavian vitorsavian merged commit bd98112 into k3s-io:release-1.26 Aug 10, 2023
@vitorsavian vitorsavian deleted the etcd-not-restoring-from-s3-with-etcd-disable-snapshots-1.26 branch October 18, 2023 00:36
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.

2 participants