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

Add notes indicating potential zombies #109

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

car-roll
Copy link
Collaborator

Test PR showing that unit tests pass when using the durable task plugin version from PR-92

@car-roll car-roll changed the title use incremental plugin version from durable task pr92 use incremental plugin version from durable task #106 Aug 2, 2019
@car-roll
Copy link
Collaborator Author

car-roll commented Aug 2, 2019

Updated to using incemental from durable-task 106

@car-roll car-roll closed this Aug 2, 2019
@car-roll car-roll reopened this Aug 2, 2019
@dwnusbaum
Copy link
Member

Would be good to go ahead and update the help for sh here as discussed in jenkinsci/durable-task-plugin#106 (comment).

@dwnusbaum
Copy link
Member

dwnusbaum commented Aug 15, 2019

It would be great to update this with the latest version of the upstream PR. You can mvn deploy the upstream plugin and use a snapshot here to avoid issues with the CI infra for now.

@car-roll
Copy link
Collaborator Author

@dwnusbaum okay will do. Thought I had to wait until the CI had to upload to incrementals :p

@car-roll car-roll changed the title use incremental plugin version from durable task #106 Update durable-task dependency and add notes indicating potential zombies Aug 17, 2019
while in Kubernetes, you may leverage
<a href="https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/"> shared process namespace</a>.
With shared process namespaces, the pod sandbox will be assigned PID 1 and assume
<a href="https://github.com/kubernetes/kubernetes/blob/master/build/pause/pause.c#L37">zombie-reaping responsibilities</a>.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that's too specific? I just couldn't find any official documentation on the zombie reaping for some reason. I found PRs and discussion and blog posts, but nothing on kubernetes.io. Maybe i'm searching for the wrong keywords?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wouldn't link directly to source code. I think the link to shared process namespaces is good enough. Any idea of how common this kind of setting is, or if there are any alternatives? It looks like it has some drawbacks in terms of security, so it seems less than ideal if that is the only way to get things working in Kubernetes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually enabled by default (as of v1.15)

Copy link
Collaborator Author

@car-roll car-roll Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only other way i'm aware of in Kubernetes would be to then roll your own init process for each container

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the ability to use the feature is what is enabled by default, but you have to explicitly use it by adding shareProcessNamespace: true to the Pod spec. I think disabling the feature makes it so that shareProcessNamespace is not a valid field for Pod specs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the feature has been discussed for a few years now, but only got introduced as a beta in its current incarnation about a year ago. That's about the only insight I can give about how common of a use case it is.

@car-roll
Copy link
Collaborator Author

Ran simple test on kubernetes with the following Jenkinsfile.
In the subsequent output, you can see that a zombie process exists in the first stage where there is no Shared Process Namespace versus the second stage where there Shared Process Namespace is enabled.

@dwnusbaum
Copy link
Member

hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: Premature EOF

Rebuilding.

@dwnusbaum dwnusbaum closed this Aug 23, 2019
@dwnusbaum dwnusbaum reopened this Aug 23, 2019
@@ -9,4 +9,13 @@
Otherwise the system default shell will be run, using the <code>-xe</code> flags
(you can specify <code>set +e</code> and/or <code>set +x</code> to disable those).
</p>
<p>
NOTE: The script is launched and monitored using a binary with the prefix <code>durable-task-monitor-</code>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe clarify that the binary is only used on some OSs

@jglick jglick changed the title Update durable-task dependency and add notes indicating potential zombies Add notes indicating potential zombies Jan 5, 2022
@jglick
Copy link
Member

jglick commented Jan 5, 2022

Is this about https://issues.jenkins.io/browse/JENKINS-58656? Does tini suffice rather than shareProcessNamespace: true?

@car-roll
Copy link
Collaborator Author

@jglick Yes, if you specify tini as en entrypoint that would work too.
fyi: kubernetes/kubernetes#84210

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

Successfully merging this pull request may close these issues.

3 participants