k0sctl
k0sctl copied to clipboard
k0sctl fails when trying k0s install on OpenRC when it's already installed
k0sctl 0.13.0-rc.1 will sometimes try to install the k0s service when it's already installed. This fails at least on OpenRC:
time="29 Mar 22 16:08 CEST" level=info msg="[ssh] 10.83.134.82:22: installing k0s controller" time="29 Mar 22 16:08 CEST" level=debug msg="[ssh] 10.83.134.82:22: executing
sudo -s /usr/local/bin/k0s install controller --enable-worker --config \"/etc/k0s/k0s.yaml\"" time="29 Mar 22 16:08 CEST" level=debug msg="[ssh] 10.83.134.82:22: Error: failed to install k0s service: failed to install service: Init already exists: /etc/init.d/k0scontroller"
A workaround is to add "--force" to spec.hosts.*.installFlags in the configuration file. But somehow I feel this shouldn't be necessary.
Okay, the --force flag is a recent addition and not part of any k0s release, yet.
There's also #302, but it seems different, since I didn't change any install flags, yet k0sctl tries to re-install k0s on the target hosts.
Installed but not running perhaps?
Installed but not running perhaps?
Yes, I think so. It's happening after #357 stopped k0s on the hosts, but failed to update the binary. Any subsequent run of k0sctl then fails because of this issue.