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 for cluster-reset backup from s3 when etcd snapshots are disabled #8169

Conversation

vitorsavian
Copy link
Contributor

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 <vitor.savian@suse.com>
@vitorsavian vitorsavian requested a review from a team as a code owner August 10, 2023 17:21
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8e945c5) 19.40% compared to head (6d3a292) 19.40%.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-1.25    #8169   +/-   ##
=============================================
  Coverage         19.40%   19.40%           
=============================================
  Files                83       83           
  Lines              5634     5634           
=============================================
  Hits               1093     1093           
  Misses             4315     4315           
  Partials            226      226           
Flag Coverage Δ
unittests 19.40% <ø> (ø)

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 5a25061 into k3s-io:release-1.25 Aug 10, 2023
11 checks passed
@vitorsavian vitorsavian deleted the etcd-not-restoring-from-s3-with-etcd-disable-snapshots-1.25 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.

None yet

2 participants