-
Notifications
You must be signed in to change notification settings - Fork 79
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
Change detection issues for the --enable-worker k0s controller install flag #801
Comments
I'm encountering the same issue. Running apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: k8s-dev
spec:
k0s:
version: v1.31.2+k0s.0
hosts:
- ssh:
address: <omitted>
user: root
port: 22
role: controller+worker
noTaints: true triggers a reinstall on the node every time. And running with
Maybe there should be an idempotency test to catch these issues? |
I just lost all cluster workers likely due to this issue combined with #722 on a simple cluster version upgrade. This is so far from "zero friction k8s" experience, honestly I've never seen issues in large production k8s installations I have to maintain anywhere near to what I see with k0s in my small 3 node install for smart home, everytime I touch anything in |
Additional problems can be anticipated because of the path-absolutization and dropping I have taken this into consideration in #803 |
v0.20.0 now includes potential improvements for this. |
I have tested the |
k0sctl 0.19.4 appears to incorrectly detect changes in the
--enable-worker
k0s controller install flag value which leads to unexpected controller restarts in the reinstall phase.Here is an example of what that looks in k0sctl's debug logs:
Notice that k0sctl detects changes in the
--enable-worker
flag value (--enable-worker:true
-->--enable-worker:
). This change by itself would not be significant, but the problem is that thek0s install controller
command seems to always produce a flag value when rendering flags (even for boolean flags):k0s install controller
command prepares controller command-line arguments (thecmdFlagsToArgs
function):https://github.com/k0sproject/k0s/blob/f74eefd01bad2764758bf57450912b0e1de68993/cmd/install/controller.go#L28-L67
https://github.com/k0sproject/k0s/blob/f74eefd01bad2764758bf57450912b0e1de68993/cmd/install/util.go#L30-L53
ExecStart
directive in the controller systemd unit file:https://github.com/k0sproject/k0s/blob/f74eefd01bad2764758bf57450912b0e1de68993/cmd/install/install.go#L56-L78
https://github.com/k0sproject/k0s/blob/f74eefd01bad2764758bf57450912b0e1de68993/pkg/install/service.go#L69-L130
This can be confirmed by examining the generated systemd unit file and the
k0s status
output on one of the controllers:Meanwhile, k0sctl uses this flag without a value here:
k0sctl/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go
Lines 285 to 295 in 9149eee
If I'm understanding the change detection logic correctly, all of this means that this change will get detected every time k0sctl applies a cluster manifest.
The text was updated successfully, but these errors were encountered: