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

Nodes can be removed as idle before the assigned tasks have started

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Quite a number of different manifestations of this observed by a number of our customers using different cloud providers. In common is the use of a "single-shot" style retention strategy, though the root cause is observable with great care when using any retention strategy other than Always.

      The basic issue is that you cannot determine if a node is idle unless you hold the Queue lock as that is the only way to ensure that the Queue is not in the process of assigning work to the node you are removing.

      Symptoms include:

      • Build logs that claim the job was executed on "master" even though the job is tied to a specific label that master does not have. The build log will have been "unable to be determined"
      • Build logs where the node is gone just as soon as the job starts
        2015-03-05 13:27:55.101 Started by upstream project "____" build number ___ 
        2015-03-05 13:27:55.102 originally caused by: 
        2015-03-05 13:27:55.103 Started by user ____ 
        2015-03-05 13:27:55.437 FATAL: no longer a configured node for ____ 
        2015-03-05 13:27:55.440 java.lang.IllegalStateException: no longer a configured node for ____ 
        2015-03-05 13:27:55.440 at hudson.model.AbstractBuild$AbstractBuildExecution.getCurrentNode(AbstractBuild.java:452) 
        2015-03-05 13:27:55.440 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:484) 
        2015-03-05 13:27:55.441 at hudson.model.Run.execute(Run.java:1745) 
        2015-03-05 13:27:55.441 at hudson.model.Build.run(Build.java:113) 
        2015-03-05 13:27:55.441 at hudson.model.ResourceController.execute(ResourceController.java:89) 
        2015-03-05 13:27:55.441 at hudson.model.Executor.run(Executor.java:240)
        

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            I have taken a look at the Azure cloud implementation... why did I do that? I knew what I was going to find before I looked... oh yes yet another completely borked cloud implementation which does everything hacky wrong ways because nobody actually knows the correct way to implement a cloud provider in Jenkins.

            I would not be surprised if the AzureSlaveCleanTaskThread causes issues, it seems to be doing lots of things it shouldn't... I really need to get the time to implement a clean cloud provisioning API so that people will stop using the current completely broken one (and just so that people who have tried to implement the Cloud API feel better, I have not seen any cloud implementation that is 100% correct... largely because the existing API is so woefully underspecified)

            Show
            stephenconnolly Stephen Connolly added a comment - I have taken a look at the Azure cloud implementation... why did I do that? I knew what I was going to find before I looked... oh yes yet another completely borked cloud implementation which does everything hacky wrong ways because nobody actually knows the correct way to implement a cloud provider in Jenkins. I would not be surprised if the AzureSlaveCleanTaskThread causes issues, it seems to be doing lots of things it shouldn't... I really need to get the time to implement a clean cloud provisioning API so that people will stop using the current completely broken one (and just so that people who have tried to implement the Cloud API feel better, I have not seen any cloud implementation that is 100% correct... largely because the existing API is so woefully underspecified)
            Hide
            phuang Peter Huang added a comment -

            I have come across the same problem.

            Show
            phuang Peter Huang added a comment - I have come across the same problem.
            Hide
            jyrmyx Jyri Ilama added a comment - - edited

            Any chance that this fix prevents builds from finishing, if e.g. azure slave clean task thread is running? This thread might take pretty long sometimes.

            I just updated from 1.606 to 1.612 and found this issue. All builds freeze in the end before triggering a downstream job. The funny part is that the builds don't even show to be running anymore in the project view, but when you open console output, you'll find the build hanging. But, when checking from Jenkins main page, you can see them still running. When the clean task thread finishes, the builds finish too.

            Show
            jyrmyx Jyri Ilama added a comment - - edited Any chance that this fix prevents builds from finishing, if e.g. azure slave clean task thread is running? This thread might take pretty long sometimes. I just updated from 1.606 to 1.612 and found this issue. All builds freeze in the end before triggering a downstream job. The funny part is that the builds don't even show to be running anymore in the project view, but when you open console output, you'll find the build hanging. But, when checking from Jenkins main page, you can see them still running. When the clean task thread finishes, the builds finish too.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/3e88ea26c3c6427651d377f5fca1c5390ddc92a4
            Log:
            JENKINS-27700 Noting that JENKINS-27565 changed settings format.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/3e88ea26c3c6427651d377f5fca1c5390ddc92a4 Log: JENKINS-27700 Noting that JENKINS-27565 changed settings format.
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html http://jenkins-ci.org/commit/jenkins/46dc6850edb1d7ef52592794b15e69db7dfbed1a Log: Noting merges JENKINS-15355 JENKINS-21618 JENKINS-22941 JENKINS-25938 JENKINS-26391 JENKINS-26900 JENKINS-27476 JENKINS-27563 JENKINS-27564 JENKINS-27565 JENKINS-27566 Fixing link text for JENKINS-6167

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: