• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.7.2

      When "# of executors" is set to 0 for a node, not only does the node disappear from the listing (as abayer pointed out to me), but the node will 404 on it's /computer/$node page.
      The work around is either to edit the config.xml and restart jenkins or use the script feature. The linked gist contains a script to set the number of executors to 2 which was used a temporary fix in our case.

      [0] - https://gist.github.com/pono/8ab92fddb9461cd62e45923b910ce81f

          [JENKINS-41182] Nodes disappear if "# of executors" is set to 0

          Daniel Beck added a comment -

          How are you setting nodes count to 0?

          Daniel Beck added a comment - How are you setting nodes count to 0?

          noob alot added a comment - - edited

          I see this issue too.

          I set the executors to 0 by going to the node's config page, changing the executor number, and saving.

          Then the node disappears.

          The way I got the node back was to edit the node's config in JENKINS_HOME/nodes/NODE_NAME/config.xml, changing the executors count, and restarting my Jenkins instance. Then the node reappeared.

          noob alot added a comment - - edited I see this issue too. I set the executors to 0 by going to the node's config page, changing the executor number, and saving. Then the node disappears. The way I got the node back was to edit the node's config in JENKINS_HOME/nodes/NODE_NAME/config.xml, changing the executors count, and restarting my Jenkins instance. Then the node reappeared.

          When I had set the node executor to 0 I observed all of the same issues described in the description here. I then tried to just create a new node with the same name, that didn't work since its still in the file system. As noob alot (nice name) mentioned you can edit the config and change the # of executors. I also noticed deleting that node's directory, restarting Jenkins, and then I'm able to create a new node with that name but then you'll have to reconfigure it.

          I'd like to suggest maybe adding more of a warning when when someone is trying to change the executors to 0 in the node config page.

          Alec Matschiner added a comment - When I had set the node executor to 0 I observed all of the same issues described in the description here. I then tried to just create a new node with the same name, that didn't work since its still in the file system. As noob alot (nice name) mentioned you can edit the config and change the # of executors. I also noticed deleting that node's directory, restarting Jenkins, and then I'm able to create a new node with that name but then you'll have to reconfigure it. I'd like to suggest maybe adding more of a warning when when someone is trying to change the executors to 0 in the node config page.

          This used to be a valid means of taking a node out of service, such that existing jobs would complete without new jobs being assigned. Is this functionality available some other way? If not, it would be a shame for the fix to be just preventing zero (though that's far better than the current behavior).

          Trevor Robinson added a comment - This used to be a valid means of taking a node out of service, such that existing jobs would complete without new jobs being assigned. Is this functionality available some other way? If not, it would be a shame for the fix to be just preventing zero (though that's far better than the current behavior).

          Daniel Beck added a comment -

           some other way?

          Mark this node as temporarily offline.

          IIRC there's going to be a message in the build log indicating the node went offline during the build (i.e. disconnected), but it's a bug.

          Daniel Beck added a comment -  some other way? Mark this node as temporarily offline. IIRC there's going to be a message in the build log indicating the node went offline during the build (i.e. disconnected), but it's a bug.

          Kseniia Nenasheva added a comment - PR #2925

          Devin Nusbaum added a comment - - edited

          After JENKINS-47793 (PR 3141), and the followup fix in PR 3292, nodes are no longer able to be configured to have 0 executors, so I think this can be closed as resolved.

          The second PR was merged into 2.108 as 5c8cc45.

          Here is a screenshot of the error I get when attempting to configure a node with 0 executors:

          Devin Nusbaum added a comment - - edited After JENKINS-47793 ( PR 3141 ), and the followup fix in PR 3292 , nodes are no longer able to be configured to have 0 executors, so I think this can be closed as resolved. The second PR was merged into 2.108 as 5c8cc45 . Here is a screenshot of the error I get when attempting to configure a node with 0 executors:

          Fixed in PR #3141 and PR #3292

          Kseniia Nenasheva added a comment - Fixed in PR #3141  and PR #3292

            ks_nenasheva Kseniia Nenasheva
            pono Pono Takamori
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: