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

Add a guardrail for etcd-snapshot #11388

Closed
manuelbuil opened this issue Nov 28, 2024 · 2 comments
Closed

Add a guardrail for etcd-snapshot #11388

manuelbuil opened this issue Nov 28, 2024 · 2 comments
Assignees

Comments

@manuelbuil
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Problem for careless users like me which might try etcd-snapshot when there is no etcd datastore

Describe the solution you'd like

A useful error that makes me aware of the real problem

Describe alternatives you've considered

Additional context

@VestigeJ
Copy link

VestigeJ commented Feb 12, 2025

Old behavior visible on v1.29.10+k3s1 - original fix PR was added in November which is why there won't be an issue on v1.32 because the branch didn't exist yet.

$ k3s etcd-snapshot save

WARN[0000] Unknown flag --node-ip found in config.yaml, skipping
WARN[0000] Unknown flag --write-kubeconfig-mode found in config.yaml, skipping
WARN[0000] Unknown flag --token found in config.yaml, skipping
FATA[0000] open /home/ec2-user/.rancher/k3s/server/token: no such file or directory

$ sudo /usr/local/bin/k3s etcd-snapshot save

WARN[0000] Unknown flag --node-ip found in config.yaml, skipping
WARN[0000] Unknown flag --write-kubeconfig-mode found in config.yaml, skipping
WARN[0000] Unknown flag --token found in config.yaml, skipping
FATA[0000] see server log for details: Unauthorized

$ k3s -v

k3s version v1.29.10+k3s1 (ae4df311)
go version go1.22.8

@VestigeJ
Copy link

Latest behavior on v1.32

$ k3s etcd-snapshot save

WARN[0000] Unknown flag --node-ip found in config.yaml, skipping
WARN[0000] Unknown flag --write-kubeconfig-mode found in config.yaml, skipping
WARN[0000] Unknown flag --token found in config.yaml, skipping
FATA[0000] Error: open /home/ec2-user/.rancher/k3s/server/token: no such file or directory

$ sudo /usr/local/bin/k3s etcd-snapshot save

WARN[0000] Unknown flag --node-ip found in config.yaml, skipping
WARN[0000] Unknown flag --write-kubeconfig-mode found in config.yaml, skipping
WARN[0000] Unknown flag --token found in config.yaml, skipping
FATA[0000] Error: see server log for details: etcd datastore disabled

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done Issue
Development

No branches or pull requests

3 participants