Skip to content
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

LeaderElector error on leader change #251

Open
kbredemeier opened this issue Jan 11, 2024 · 2 comments
Open

LeaderElector error on leader change #251

kbredemeier opened this issue Jan 11, 2024 · 2 comments

Comments

@kbredemeier
Copy link
Contributor

Environment

  • Bonny version 1.4.0
  • Elixir & Erlang/OTP versions (elixir --version): 1.14/OTP25.3
  • Operating system: Docker Container derived from elixir:1.14-alpine
  • K8s: AKS v1.28.3

Current behavior

I'm occasionally seeing the following error:

** (CaseClauseError) no case clause matching: {:error, %K8s.Client.APIError{message: "etcdserver: leader changed", reason: "Failure"}}

Backtrace:
lib/bonny/operator/leader_elector.ex:200 Bonny.Operator.LeaderElector.acquire_or_renew/2	
lib/bonny/operator/leader_elector.ex:86 Bonny.Operator.LeaderElector.handle_info/2	
gen_server.erl:1077 :gen_server.try_handle_info/3	
gen_server.erl:1165 :gen_server.handle_msg/6	
proc_lib.erl:241 :proc_lib.init_p_do_apply/3

I'm not sure what's causing this issue for me but google indicates that this might be caused by some snapshot running every 2h on AKS clusters resulting in this leader change.

Expected behavior

Not sure, maybe this should just log a warning 🤷

@mruoss
Copy link
Collaborator

mruoss commented Jan 12, 2024

Hmm... this is new to me. Does the operator recover afterwards?

@kbredemeier
Copy link
Contributor Author

Hmm... this is new to me. Does the operator recover afterwards?

I'm not sure yet. I was not able to inspect this before someone restarted the pod, just found it in our error reporting tool.
But I do run into an issue where the operator stops receiving add events, but I'm not sure this is related. Still investigating... this happens very rarely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants