-
Notifications
You must be signed in to change notification settings - Fork 31
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
Leader election lease not removed on shutdown #40
Comments
Update: I see this works when starting kubedock server from my local machine with full permissions on the target namespace. The lease is successfully released with |
Fixed the documentation with regards to RBAC required for locking. After adding the 'update' verb, I could not reproduce with |
Thanks for updating the docs. I can confirm that the lease is returned correctly (having |
Can you share the logs during start & exit of kubedock? |
There's a difference in the shutdown behavior, depending how we run kubedock and how we terminate it. When we start kubedock inside a running container and then stop it explicitly with Logs when stopped with
|
I worked a bit on the shutdown code, which might fixed your issue as well. Can you retest? |
Great! I can confirm that with the latest version from Git master (tested with 24f9ef4, the lease is now released as expected when terminating the kubedock process as described earlier. |
Awesome, thanks for confirming. I will close this issue, and the fix will be included in the next release. |
I'm running kubedock on OpenShift to enable Testcontainers within Tekton pipelines.
When using the
--lock
option, the first timekubedock server
starts, it'll create thekubedock-lock
lease. But when terminating kubedock (with kill -3), the lease remains and on the next run, the server hangs with the message "leaderelection.go:245] attempting to acquire leader lease esta-tekton-predev/kubedock-lock..." and the testcontainers fail because the Docker API is not available.Maybe it would make sense to remove the lease when shutting down kubedock. Or is there something I'm missing when using the --lock option?
The text was updated successfully, but these errors were encountered: