yet-another-docker-plugin icon indicating copy to clipboard operation
yet-another-docker-plugin copied to clipboard

Add a slave container configuration timeout

Open ndessart opened this issue 6 years ago • 4 comments

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

ndessart avatar Apr 05 '19 15:04 ndessart

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.

codecov-io avatar Apr 05 '19 15:04 codecov-io

Should the same be added in windows script?

KostyaSha avatar Apr 25 '19 19:04 KostyaSha

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 avatar Apr 30 '19 17:04 ndessart

imho let's better add this value into UI settings

KostyaSha avatar Jun 20 '19 18:06 KostyaSha