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] - --etcd-disable-snapshots flag usage leads to unexpected behavior #8166

Closed
vitorsavian opened this issue Aug 10, 2023 · 1 comment
Assignees
Milestone

Comments

@vitorsavian
Copy link
Contributor

Backport fix for --etcd-disable-snapshots flag usage leads to unexpected behavior

@ShylajaDevadiga
Copy link
Contributor

Validated on release-1.25 branch using commit id fdc7485

Environment Details

Infrastructure
Cloud EC2 instance

Node(s) CPU architecture, OS, and Version:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"

Cluster Configuration:
Single node

Config.yaml:

$ cat /etc/rancher/k3s/config.yaml 
cluster-init: true
etcd-disable-snapshots: true
etcd-s3: true
etcd-s3-access-key: 'KEY'
etcd-s3-secret-key: 'SECRET'
etcd-s3-region: 'REGION'
etcd-s3-bucket: 'BUCKET'

Steps to reproduce

  1. Copy config.yaml
  2. Install k3s
  3. Take a snapshot passing s3 params
  4. Stop k3s service
  5. Restore the snapshot passing s3 params
  6. Start k3s service
  7. Verify the cluster is up and running

Replication results:

$ k3s -v
k3s version v1.25.12+k3s1 (7515237f)
go version go1.20.6
FATA[0009] starting kubernetes: preparing server: start managed database: etcd: snapshot path does not exist: on-demand-ip-172-31-15-87-1692400560 

Validation results:

$ k3s -v
k3s version v1.25.12+k3s-80e1c74a (80e1c74a)
go version go1.20.6
INFO[0020] Managed etcd cluster membership has been reset, restart without --cluster-reset flag now. Backup and delete ${datadir}/server/db on each peer etcd server and rejoin the nodes 

After restore

$ kubectl get nodes
NAME              STATUS   ROLES                       AGE     VERSION
ip-172-31-6-153   Ready    control-plane,etcd,master   7m54s   v1.25.12+k3s-80e1c74a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants