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 a slave container configuration timeout #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ndessart
Copy link

@ndessart ndessart commented Apr 5, 2019

This should fix the following issue.
When a JobDSL seed job is executed while a container is waiting for its
configuration YAD plugin may loose track of the container.
The container is left behind indefinitely waiting for its configuration.

We are using the JobDSL plugin to generate multiple cloud sections in $JENKINS_HOME/config.xml
but the problem arise even when their is no change in the clouds configuration.
I imagine that when the seed job is executed it somehow reload the plugins and the container provisioning task is dropped in midflight.
The "Set exclusive execution" is set in our seed job but that doesn't prevent YAD from provisioning a container while a seed job is running (the provisioning task is not part of any job).

With this change, the container eventually exit in error and the jenkins
master is able to provision another container.

Environment:
Jenkins ver. 2.150.1
Job DSL plugin 1.70
Yet Another Docker Plugin 0.1.0-rc51

@codecov-io
Copy link

codecov-io commented Apr 5, 2019

Codecov Report

Merging #252 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #252   +/-   ##
=========================================
  Coverage     19.49%   19.49%           
  Complexity      247      247           
=========================================
  Files            73       73           
  Lines          3027     3027           
  Branches        286      286           
=========================================
  Hits            590      590           
  Misses         2376     2376           
  Partials         61       61

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40b12e3...df96877. Read the comment docs.

@KostyaSha
Copy link
Owner

Should the same be added in windows script?

This should fix the following issue.
When a JobDSL seed job is executed while a container is waiting for its
configuration YAD plugin may loose track of the container.
The container is left behind indefinitely waiting for its configuration.

With this change, the container eventually exit in error and the jenkins
master is able to provision another container.
@ndessart
Copy link
Author

Yes, I think so!
Sorry, I've just realized that Windows containers are a thing.
I've just submitted a new patch set for Windows. I don't have access to a Windows machine so I've quickly checked the syntax with a PowerShell port on linux.

@ndessart ndessart reopened this Apr 30, 2019
@KostyaSha
Copy link
Owner

imho let's better add this value into UI settings

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

Successfully merging this pull request may close these issues.

None yet

3 participants