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

Fails to change leadership when leader pod in configMap doesn't exist #804

Closed
jaredstehler opened this issue May 27, 2021 · 1 comment
Closed
Labels

Comments

@jaredstehler
Copy link

In the case where the leadership configMap references a non-existent pod (perhaps in the case of a cluster rolling upgrade?), the leadership controller gets into a state where it cannot update leader to a valid active pod.

This is due to the underlying fabric8 library's Readiness::isReady() throwing IllegalArgumentException when the queried item is null / missing. See: fabric8io/kubernetes-client#2672

Since this is resolved in fabric8 5.1+ and there seems to be a question of even continuing on with fabric8, it would seem that the simplest solution here would be to wrap Fabric8LeadershipController::isPodReady() with a try/catch and return false on IllegalArgument?

https://github.com/spring-cloud/spring-cloud-kubernetes/blob/main/spring-cloud-kubernetes-fabric8-leader/src/main/java/org/springframework/cloud/kubernetes/fabric8/leader/Fabric8LeadershipController.java#L131

@jaredstehler
Copy link
Author

project has since moved fabric8 dep to 5.5.

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

Successfully merging a pull request may close this issue.

3 participants