k0sctl
k0sctl copied to clipboard
Reset fails to unmount/unlink /var/lib/k0s on alpine
time="2023-10-06T08:41:06Z" level=debug msg="[ssh] 127.0.0.1:9023: resetting k0s..."
time="2023-10-06T08:41:06Z" level=debug msg="[ssh] 127.0.0.1:9023: executing `/usr/local/bin/k0s reset --data-dir=/var/lib/k0s`"
time="2023-10-06T08:41:07Z" level=debug msg="[ssh] 127.0.0.1:9023: (stderr) time=\"2023-10-06 08:41:07\" level=warning msg=\"failed to unmount /var/lib/k0s\""
time="2023-10-06T08:41:07Z" level=debug msg="[ssh] 127.0.0.1:9023: (stderr) time=\"2023-10-06 08:41:07\" level=warning msg=\"To ensure a full reset, a node reboot is recommended.\""
time="2023-10-06T08:41:07Z" level=debug msg="[ssh] 127.0.0.1:9023: (stderr) Error: errors received during clean-up: [failed to delete /var/lib/k0s. err: unlinkat /var/lib/k0s: device or resource busy]"
time="2023-10-06T08:41:07Z" level=debug msg="[ssh] 127.0.0.1:9023: k0s reset failed: "
time="2023-10-06T08:41:07Z" level=warning msg="[ssh] 127.0.0.1:9023: k0s reported failure: command failed: client exec: ssh session wait: Process exited with status 1"
Could be a k0s issue
Can't understand where the warning comes from, there's no log.Warn in k0s's dir cleanup 🤔
Also can't understand why this doesn't fail with all images, since removing the volume /var/lib/k0s doesn't work on any other image either because it's a volume.
I saw that too, I mounted something to /var/lib/k0s. Maybe delete content of the dir instead when it's a mountpoint?
@ncopa you had some thoughts about some cgroupv2 thing?