-
Notifications
You must be signed in to change notification settings - Fork 78
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
Check new controllers against etcd member-list to detect replaced hosts #714
Conversation
fa1aa89
to
7b922ea
Compare
805a0d1
to
3debfb6
Compare
This was confirmed to help with the problem in some conditions. Could we also use the node list as another way to see if the node is previously known maybe? |
By node list, you mean, figuratively speaking, The best way of checking etcd memebers would be to use the EtcdMemeber CRDs. You probably want to try that first. This only works for new k0s versions, but in case the CRDs aren't registered, k0sctl could gracefully degrade and use |
Signed-off-by: Kimmo Lehto <[email protected]>
Signed-off-by: Kimmo Lehto <[email protected]>
Signed-off-by: Kimmo Lehto <[email protected]>
Addresses #603
Before installing new controllers, check if the address is already found from
k0s etcd member-list
. If a match with the same address is found, theapply
process is aborted. K0sctl can try to perform theetcd leave
for the vanished address automatically when--force
is used. This check is skipped when kine or an external etcd is used.This protects against situations when a controller host in k0sctl.yaml gets completely wiped or replaced with a fresh one between two runs. Previously k0sctl would have treated it as a regular new controller and caused the etcd to get confused / split brained.
There was also a bug when adding new controllers in general, writing the config on the previously existing clusters could have failed with "empty content on file write" error.