Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57136

Allow users to customize docker timeouts

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 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.

      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 Pipeline
      
      GitHub 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).

            Unassigned Unassigned
            leeopop Keunhong Lee
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: