-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Thread spins logging "Error while waiting for resource to be scaled" #1856
Comments
I understand more about this issue now. It comes about when you've io.fabric8.kubernetes.client.DefaultKubernetesClient#load a resource such as a statefulset then call In this case, the object is never fetched from the server ( My initial PR doesn't really help. The code still just spins comparing I think the code ought to omit the waitUntilScaled part if reloadingFromServer is false. |
…leable resource (e.g. statefulset).
…leable resource (e.g. statefulset).
@k-wall : apologies for the late reply, let me go through your new PR and see if can be merged. |
Using 4.6.2, I am seeing a situation where a kubernetes-client thread spins in a tight loop with the following exception logged, every 50ms:
2019-11-06T14:59:28.679Z ERROR [StatefulSetOperationsImpl] Error while waiting for resource to be scaled. java.lang.NullPointerException: null at io.fabric8.kubernetes.client.dsl.internal.StatefulSetOperationsImpl.getCurrentReplicas(StatefulSetOperationsImpl.java:72) at io.fabric8.kubernetes.client.dsl.internal.StatefulSetOperationsImpl.getCurrentReplicas(StatefulSetOperationsImpl.java:35) at io.fabric8.kubernetes.client.dsl.internal.RollableScalableResourceOperation.lambda$waitUntilScaled$0(RollableScalableResourceOperation.java:104) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 201
I notice that
StatefulSetOperationsImpl#getObservedGeneration
is careful to guard against a null current.getStatus(), butStatefulSetOperationsImpl.getCurrentReplicas
does not.The text was updated successfully, but these errors were encountered: