fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.41k stars 1.46k forks source link

Invalid Failed to acquire lease log everytime in DEBUG #5184

Closed gyfora closed 1 year ago

gyfora commented 1 year ago

Describe the bug

The https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/extended/leaderelection/LeaderElector.java#L164 module incorrectly always logs Failed to acquire lease. Even if it was successful

Fabric8 Kubernetes Client version

6.6.2

Steps to reproduce

Start LeaderElector

Expected behavior

Only log failure if it failed

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.25.3@latest

Environment

macOS

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

shawkins commented 1 year ago

@gyfora did you want to submit a fix for this?

gyfora commented 1 year ago

@shawkins I am afraid it may be difficult due to some internal legal/process reasons with my employer. But I will follow up on this to see how I can contribute fixes/patches in the future.