-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
k0s error "an instance of k0s is already running" but it is not running #5399
Comments
I see you're using OpenWRT. The runtime config file is stored in
The good ol' problem with PID file races. This has been addressed in in other parts of k0s already, but it's still not solved in the case you just described. To mitigate this, you could try to make |
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This also solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This also solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This also solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This also solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Use lock file and flock(2) to ensure there is only a single instance of k0s running. This is more reliable than storing the pid in the runtime config. This solves false positives with k0s runtime config leftovers. Fixes: k0sproject#5399 Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Before creating an issue, make sure you've checked the following:
Platform
Version
v1.31.1+k0s.0-448-g95fc4b1de
Sysinfo
`k0s sysinfo`
What happened?
When running k0s in one of our deployments, we noticed that during startup with an existing runtime config file, it thinks it's running, but it isn't since the system just started up from scratch. The root cause is, that the detection in the linux runtime works by checking if the pid from the runtime config is a running process on the system, but not if the pid is actually the same executable image.
So what happens is, that if any other process during startup takes up that pid value from the runtime config, k0s thinks it is already running although it isn't.
Steps to reproduce
Expected behavior
k0s should just start without erroring that it is already running
Actual behavior
k0s shows error "an instance of k0s is already running"
Screenshots and logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: