jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-57136] Allow users to customize docker timeouts
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
Though docker enables fast creation of containers, docker is still slow when being executed under legacy environment (e.g. dir file system).
Though the timeout for docker commands has been increased to 180/300 seconds by https://issues.jenkins-ci.org/browse/JENKINS-42322, I think the timeout should be configurable.
I sometimes get failure like this:
ERROR: Timeout after 180 seconds
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of PipelineGitHub has been notified of this commit’s build result
java.io.IOException: Failed to run image '****'. Error:
However, the same code just succeeded its build few minutes ago.
That's because the execution time of a docker command varies depending on the system load.
In my example, it took several minutes to create a container.
(As my docker runtime uses dir-based filesystem, on a software raid partition.)
***@***:~$ date; docker run -t ****/bin/ls; date;
Mon Apr 22 16:41:43 ***2019
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
Mon Apr 22 16:43:55 ***2019
(with 6G docker image for latex compilation)
We might conclude to increase the timeout to 10min, but I think we should provide a configurable timeouts (either via web or local configuration file).
---
Originally reported by
leeopop, imported from: Allow users to customize docker timeouts
Raw content of original issue
Though docker enables fast creation of containers, docker is still slow when being executed under legacy environment (e.g. dir file system).
Though the timeout for docker commands has been increased to 180/300 seconds by https://issues.jenkins-ci.org/browse/JENKINS-42322, I think the timeout should be configurable.
I sometimes get failure like this:
ERROR: Timeout after 180 seconds
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of PipelineGitHub has been notified of this commit’s build result
java.io.IOException: Failed to run image '****'. Error:
However, the same code just succeeded its build few minutes ago.
That's because the execution time of a docker command varies depending on the system load.
In my example, it took several minutes to create a container.
(As my docker runtime uses dir-based filesystem, on a software raid partition.)***@***:~$ date; docker run -t ****/bin/ls; date;
Mon Apr 22 16:41:43 ***2019
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
Mon Apr 22 16:43:55 ***2019(with 6G docker image for latex compilation)
We might conclude to increase the timeout to 10min, but I think we should provide a configurable timeouts (either via web or local configuration file).
environment
```
Jenkins installed directly to a Debian LXC and docker is installed inside the LXC.
Jenkins runs outside the docker but the user 'jenkins' has 'docker' group access.
```
Contributor guide
Assessment
This issue has not been assessed yet.