-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Wait for complete disconnection with pod slaves #248
Wait for complete disconnection with pod slaves #248
Conversation
you can push more commits to your branch, no need to create new PRs |
No, you can force push to your branch and it will update the PR |
// Assuming pod template has some error itself | ||
// Simply return might leave some kuberentes pod of ERROR state | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} catch(TimeoutException | InterruptedException | ExecutionException e){
String msg = String.format("Error waiting for agent disconnection %s: %s", name, e.getMessage());
LOGGER.log(Level.INFO, msg, e);
I think it should be simpler, and we don't care if disconnection does not happen, we will continue with pod deletion |
@carlossg At least, it will be helpful for large scale production deployment. |
WDYM ? my suggestion will print the same exceptions as yours |
I think it will be fine if we simply continue to delete pods when InterruptExcetion/ExecutionException happens. |
Allow configuring the timeout as a system property
BUG Fix
Sometimes it can be failed to delete a pod slave with following trace.
This is because pod disconnecting itself is a asynchronous process.
kubernetes-plugin/src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesSlave.java
Line 169 in 4303ec3
If we explicitly block on that, and do the pod deletion after safe disconnection. This error will just disappear.