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

Run containers with --init by default to avoid leaking zombie processes. #312

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

Conversation

Romain-Geissler-1A
Copy link
Contributor

@Romain-Geissler-1A Romain-Geissler-1A commented Apr 27, 2024

People running containers manually usually run with pid 1 being a $SHELL, in which case waiting for child termination is something implemented already as it's the core job of a $SHELL. However with this jenkins plugin the command run is usually "cat" on Linux, which doesn't wait at all for children. To have in jenkins a situation a bit like during interactive container experience, start containers with --init so zombie processes are correctly reaped.

Testing done

Your CI still works (and it was broken before, as I had to fix it in #313 that I included in this pull request to have a green build).

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options

People running containers manually usually run with pid 1 being a
$SHELL, in which case waiting for child termination is something
implemented already as it's the core job of a $SHELL. However with this
jenkins plugin the command run is usually "cat" on Linux, which doesn't
wait at all for children. To have in jenkins a situation a bit like
during interactive container experience, start containers with --init
so zombie processes are correctly reaped.
@Romain-Geissler-1A
Copy link
Contributor Author

@MarkEWaite @jglick Now that you have merged the pre-requisite pull request, what do you think about the principle of that one (which actually was my reason for trying to fix the unit tests in the first pull requests) ;)

@jglick
Copy link
Member

jglick commented May 28, 2024

I have no opinion and prefer not to merge any behavioral changes to this plugin ever again unless required for test suites to continue passing. Its use should be avoided. Someone else who purports to maintain the plugin is free to review and merge.

@MarkEWaite
Copy link
Contributor

@Romain-Geissler-1A I'm not a maintainer of this plugin. I think that the other people who are listed as plugin maintainers are the ones that would need to decide if they are willing to support this change and continue to maintain this change after it is released.

@Romain-Geissler-1A
Copy link
Contributor Author

Well @jglick made it clear that there is no future for this plugin but to just make it build and "work" as is, without change. Not sure what's the strategy of cloudbees to be honest, and it happens that @jglick replied just one day after we had a visite from some cloudbees representative in my company, so we couldn't ask specifically about what will happen with this plugin. Maybe I will raise this pull request via our contact there then, because I honestly fail to see how a docker plugin used by quite some instance entered such a frozen state, and how such a rather innocent pull request can affect stability of the plugin.

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