Comments (7)
it sounds like your scenario is effectively the same as running:
oc delete pod foo
and then while the command returns immediately, the pod keeps running for some period of time until it is killed. Is that accurate?
If so, i think the only way we can do better here is to offer a way for you to "wait for termination" when deleting objects (we'd have to watch/poll to see when the object actually goes away).
Note that your containers should be getting a SIGTERM when the delete occurs, so if they are continuing to do work, they are ignoring that signal (in which case k8s gives them about 30s to terminate before it hard-kills them). You might be able to modify the grace period such that the pod is immediately terminated instead, as a workaround.
from jenkins-plugin.
(will create trello card or incorporate into existing card if applicable once we lock down the detail or two @bparees asked @livelace about)
from jenkins-plugin.
and then while the command returns immediately, the pod keeps running for some period of time until it is killed. Is that accurate?
Yes, absolutely. The period depend on the node utilization, application inside pod ... etc In my case the problem is in parse xml file, which locked inside pod and the next Jenkins step can't handle it correctly.
If so, i think the only way we can do better here is to offer a way for you to "wait for termination" when deleting objects (we'd have to watch/poll to see when the object actually goes away).
It sounds good.
from jenkins-plugin.
I've opened this trello card to track this request ... closing github issue out per process.
from jenkins-plugin.
@livelace did you try setting the grace period to 0s? i'm curious if that would fix your problem:
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L160-L164
from jenkins-plugin.
@bparees I didn't find the "deletionGracePeriodSeconds" parameter in my "ClusterPolicy". But I compared situation with deletion of objects.
- for type in route rc dc svc pod;do for i in $(oc get $type | awk '{print $1}');do oc delete $type $i;done;done - one Pod which did some operations (postStart hook) was alive for 1-2 minutes in the "Terminating" state.
- for type in route rc dc svc pod;do for i in $(oc get $type | awk '{print $1}');do oc delete --grace-period=0 $type $i;done;done - it killed all immediately
I think, that both parameters are needed, because someone wants to get completely finished writing of data, and someone wants to get the immediately deleted objects.
I want that it could complete all tasks and shift to the next step :)
from jenkins-plugin.
@bparees I didn't find the "deletionGracePeriodSeconds" parameter in my "ClusterPolicy"
it's not a cluster policy setting, it's a setting on each resource (in this case the pod resource).
But yes if your pods need that grace period to properly clean up then setting it to zero won't be a valid workaround for your scenario, unfortunately.
from jenkins-plugin.
Related Issues (20)
- Patch / Update resources HOT 9
- jenkins template using spec.clusterIP instead of spec.portalIP HOT 2
- Build output sometimes not shown in jenkins console output HOT 2
- Deployments don't work HOT 3
- Environment Variables don't respect Parameterised Builds HOT 6
- Timeout of builds HOT 3
- Unable to do openshiftTag() in pipeline HOT 1
- FR: Support of variables inside Openshift Exec HOT 9
- BUG: "Test connection" always returns "Connections successful" HOT 11
- BUG: OpenshiftExec ignores timeout HOT 12
- Confusing print statement if openshiftVerifyDeployment fails HOT 1
- okhttp binary changes break plugin when others installed HOT 11
- Externalize the CERT_FILE = "/run/secrets/kubernetes.io/serviceaccount/ca.crt"; HOT 7
- Issue with Jenkin's Verify Build OpenShift plug-in functionality HOT 9
- Declarative pipeline support? HOT 4
- openshift-client-plugin really still a "tech preview" ? HOT 3
- Jenkins throws an error when using the openhiftBuild with the buildConfig parameter HOT 3
- Resulting GDSL is Broken HOT 2
- openshiftBuild should support binary build type. HOT 10
- Add deprecation warning and link to new plugin as first thing in repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins-plugin.