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.24] Etcd snapshots retention when node name changes #8124

Merged

Conversation

vitorsavian
Copy link
Member

Proposed Changes

  • Delete the oldest snapshot files inside the node and s3 if the snapshot count is greater than the retention, regardless of the node name.

Types of Changes

Verification

Need to create a cluster with etcd snapshots enabled and s3

k3s server --cluster-init --etcd-snapshot-schedule-cron "*/1 * * * *" --etcd-snapshot-retention 2 --etcd-s3 --etcd-s3-access-key --etcd-s3-secret-key --etcd-s3-bucket

Then you can see in the /var/lib/rancher/k3s/server/db/snapshots that will maintain the retention

ls /var/lib/rancher/server/db/snapshots

If you are using AWS, you can just reboot the machine to have another name, and just restarted the cluster, it will still delete the snapshot inside /var/lib/rancher/server/db/snapshots and maintain the retention

Testing

Linked Issues

User-Facing Change

NONE

Further Comments

Signed-off-by: Vitor <vitor.savian@suse.com>
@vitorsavian vitorsavian requested a review from a team as a code owner August 3, 2023 15:45
@vitorsavian vitorsavian merged commit 3efc14e into k3s-io:release-1.24 Aug 4, 2023
5 of 6 checks passed
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