-
Bug
-
Resolution: Fixed
-
Major
-
None
-
-
4186.v1d804571d5d4
The way the Kubernetes plugin tracks pod usage, a slot is registered as soon as a Planned Node is created:
And unregistered only when a Node is deleted:
There are however cases where a Planned Node is indeed created but the resulting Node never created. For example:
- https://github.com/jenkinsci/jenkins/blob/jenkins-2.387.1/core/src/main/java/hudson/slaves/NodeProvisioner.java#L231-L240
- https://github.com/jenkinsci/kubernetes-plugin/blob/9c1d58d9badd988622b4772632037126176e1ef0/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java#L613-L630
Which could lead to situation where slots are leaked and the provisioning limit is reached while in reality it is not.