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

Build cannot be aborted when plugin is in waitUntilContainerIsReady

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • kubernetes plugin version 0.11

      We run into this when e.g. specifying a non-existing image in containerTemplate.

      The pod will be stuck in Waiting: ImagePullBackOff (without the build log showing that problem).
      The build will be waiting at

      at org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator$1.waitUntilContainerIsReady(ContainerExecDecorator.java:183)
      

      (code at tag 0.11).

      If the user tries to abort the build (which they will), the ONLY option that works is "forcibly abort the whole build". This has the downside that

      • the pod will not be deleted in kubernetes
      • the podTemplate will stay around in the global Jenkins configuration ($JENKINS_URL/configure)

          [JENKINS-45772] Build cannot be aborted when plugin is in waitUntilContainerIsReady

          Martin Sander added a comment -

          This might already be solved when JENKINS-32986 implements

          If the CPS VM is running native code, Thread.interrupt should be called. It should be given a limited grace period—say, a few seconds—to terminate; after that, resort to Thread.stop, making sure we are able to provide a fresh Thread for the pool so we can still run finally blocks or whatever.

          Martin Sander added a comment - This might already be solved when JENKINS-32986 implements If the CPS VM is running native code, Thread.interrupt should be called. It should be given a limited grace period—say, a few seconds—to terminate; after that, resort to Thread.stop, making sure we are able to provide a fresh Thread for the pool so we can still run finally blocks or whatever.

            Unassigned Unassigned
            0x89 Martin Sander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: