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

Retention time does not respect long running tasks

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • _unsorted
    • Jenkins - 2.121.1
      Azure Commons - 0.2.6
      Azure Credentials - 1.6.0
      Azure Slave Plugin - 0.3.4
      Azure VM Agents - 0.7.1

      We set the retention time for one of our images to 1 hour, but the plan itself takes up to 4 hours.

      The node gets removed after the retention time but the node is not idle nor failing. After the node removal, the plan is left running and not doing anything forever (we have plans running for days).

      Is a huge problem since the nodes we spin up are very expensive so we want to keep them alive as less as possible to perform the build and shutdown if there are no more builds queuing. So our current workaround of setting the retention time higher than the build duration is more than sub-optimal.

      See attached pictures for more info.

          [JENKINS-51940] Retention time does not respect long running tasks

          Eduardo Lezcano created issue -
          Eduardo Lezcano made changes -
          Attachment Original: Screenshot from 2018-06-14 09-43-17.png [ 42869 ]
          Eduardo Lezcano made changes -
          Attachment New: Screenshot from 2018-06-14 09-43-17.png [ 42870 ]
          Eduardo Lezcano made changes -
          Attachment Original: Screenshot from 2018-06-14 09-56-16.png [ 42865 ]
          Eduardo Lezcano made changes -
          Attachment New: Screenshot from 2018-06-14 09-56-16.png [ 42871 ]
          Eduardo Lezcano made changes -
          Description Original: We set the *retention time* for one of our images to *1 hour*, but *the plan* itself *takes up to 4 hours*.

          The node gets removed after the retention time (1 hour) but the node is not idle nor failing (See screenshot of the plan "Running task 8425"). After the node removal, the plan is left running and not doing anything forever (we have plans running for days).

          Is a huge problem since the *nodes we spin up are very expensive* so we want to keep them *alive as less as possible* to perform the build and shutdown if there are no more builds queuing.

          See attached pictures for more info.
          New: We set the *retention time* for one of our images to *1 hour*, but *the plan* itself *takes up to 4 hours*.

          The node gets removed after the retention time (1 hour) but the node is not idle nor failing (See screenshot of the plan "Running task 8425"). After the node removal, the plan is left running and not doing anything forever (we have plans running for days).

          Is a huge problem since the *nodes we spin up are very expensive* so we want to keep them *alive as less as possible* to perform the build and shutdown if there are no more builds queuing. So our current workaround of setting the *retention time higher than the build duration* is more than sub-optimal.

          See attached pictures for more info.
          Eduardo Lezcano made changes -
          Description Original: We set the *retention time* for one of our images to *1 hour*, but *the plan* itself *takes up to 4 hours*.

          The node gets removed after the retention time (1 hour) but the node is not idle nor failing (See screenshot of the plan "Running task 8425"). After the node removal, the plan is left running and not doing anything forever (we have plans running for days).

          Is a huge problem since the *nodes we spin up are very expensive* so we want to keep them *alive as less as possible* to perform the build and shutdown if there are no more builds queuing. So our current workaround of setting the *retention time higher than the build duration* is more than sub-optimal.

          See attached pictures for more info.
          New: We set the retention time for one of our images to 1 hour, but the plan itself takes up to 4 hours.

          The node gets removed after the retention time but the node is not idle nor failing. After the node removal, the plan is left running and not doing anything forever (we have plans running for days).

          Is a huge problem since the nodes we spin up are very expensive so we want to keep them alive as less as possible to perform the build and shutdown if there are no more builds queuing. So our current workaround of setting the retention time higher than the build duration is more than sub-optimal.

          See attached pictures for more info.

          I just read a comment by Jack Chen pointing a possible problem having a test instance of Jenkins using the same configuration.

          https://wiki.jenkins.io/display/JENKINS/Azure+VM+Agents+plugin

          I will try disconnecting the second instance from Azure to see if the problem persist and drop here my findings for the record.

          Eduardo Lezcano added a comment - I just read a comment by Jack Chen pointing a possible problem having a test instance of Jenkins using the same configuration. https://wiki.jenkins.io/display/JENKINS/Azure+VM+Agents+plugin I will try disconnecting the second instance from Azure to see if the problem persist and drop here my findings for the record.

          Disconnecting a second Jenkins instance has worked and the setup is currently working as expected.

          I close the issue.

          Eduardo Lezcano added a comment - Disconnecting a second Jenkins instance has worked and the setup is currently working as expected. I close the issue.
          Eduardo Lezcano made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            azure_devops Azure DevOps
            edupo Eduardo Lezcano
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: