-
Notifications
You must be signed in to change notification settings - Fork 181
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
LeaderElection related bug on version 4.0.3 #1585
Comments
cc @shawkins - this looks like more an issue with the leader election in client, are you aware of such issue? |
@csviri is there just a single elector? Unfortunately it seems possible for this to occur in that case as there's no explicit locking - just a volatile variable to track the latest record. So a cancel could occur in between an update operation and setting the latest record. |
@shawkins thx, I see. So what is happening that the record it not read again on cancel, so there is an optimistic locking issue if someone changed the resource meanwhile. I have some questions:
|
@csviri I mean, operator "looks like" stopped, but process is not terminated. |
No, the leader election logic just needs some synchronization.
It is possible that someone else assumed leadership by the time this call is being made. The exception would be the same, but it wouldn't matter as the leadership is already lost. |
@hoony9x are you able to take a thread dump and see what non-daemon threads are still running? |
That is strange as you can see here:
|
By refresh I meant lead the latest version. |
As @shawkins explained that actually might be expected, also see an improvement on this: |
Since there was already an improvement on this since, and the mentioned error is expected in some situations, will close this issue, and reopen in case there are still some issues. |
Bug Report
What did you do?
I just tried to stop running operator.
java-operator-sdk
is4.0.3
.What did you expect to see?
Should be shut down without error message like below. (Below logs are generated from Operator SDK
3.2.3
)What did you see instead? Under which circumstances?
Operator framework throws an error message "Unable to update LeaseLock" like below.
In above state, operator is still in STOPPING state.
Environment
Kubernetes cluster type:
$ Mention java-operator-sdk version from pom.xml file
4.0.3
$ java -version
$ kubectl version
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: