-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
k3s wipes its server token #11204
Comments
Wipes which token from where? Please provide specific steps to reproduce, along with full details on your cluster config. Are you using sqlite, embedded etcd, or an external database? Where exactly are you replacing the args? In the config file? In the systemd unit? Are you doing that by hand, or by rerunning the install script? |
Made the file path fully qualified in the comment. I change the flags in the nixos configuration which would be somewhat our of the scope of this issue to post. It affects the systemd unit and I can confirm it's reproducible if I run the k3s binary with the relevant flags by hand. The effect is that the token file is truncated. |
OK, can you provide the sequence of |
Funny enough, the previously guaranteed repro no longer triggers. That said, the only place the token is written is writeToken. and that calls os.WriteFile which can truncate the file first and fail after (see also golang/go#56173) It's extremely curious that I'd expect the error to bubble up into |
I did a number of Still, the only way it could theoretically fail would be in |
Yeah, I can't really see how this would happen either unless the k3s process was interrupted at JUST the right time or there is some underlying weirdness with the host that caused an unsynced write to the file to get lost. If you are able to reproduce this on demand on a stable node, please let us know how and we can reopen. |
Environmental Info:
K3s Version:
v1.31.1+k3s1 (452dbbc)
Node(s) CPU architecture, OS, and Version:
Linux horse 6.6.56 #1-NixOS SMP PREEMPT_DYNAMIC Thu Oct 10 10:50:06 UTC 2024 x86_64 GNU/Linux
Cluster Configuration:
1 server (single node cluster)
Describe the bug:
k3s zeroes its
/var/lib/rancher/k3s/server/token
and is unable to start up after (the reoccurrence of #5345).Steps To Reproduce:
What triggers it for me (reliably) is
--kubelet-arg=node-ip=IPV4,IPV6
with--node-ip=IPV4,IPV6
and--node-external-ip=IPV6
--node-external-ip=IPV6
Expected behavior:
the node boots up
Actual behavior:
the node wipes its token
The text was updated successfully, but these errors were encountered: