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

Suspended agents do not start accepting tasks when policy changed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • 2.439

      If SimpleScheduledRetentionStrategy is used, the agent is regularly put to suspended state with setAcceptingTasks(false) according to schedule. If the policy is changed while the agent is suspended, suspended flag retain intact and the agent can't be used.

          [JENKINS-11889] Suspended agents do not start accepting tasks when policy changed

          Vitalii Tymchyshyn created issue -

          Nick Parrish added a comment -

          I am seeing this too. It is very annoying.

          I changed the slave's policy back to "keep this slave on-line as much as possible" and it will not accept jobs (says "(suspended)").

          I tried marking the node as offline and bringing it back online - no change.

          I tried disconnecting and reconnecting the slave - no change.

          Nick Parrish added a comment - I am seeing this too. It is very annoying. I changed the slave's policy back to "keep this slave on-line as much as possible" and it will not accept jobs (says "(suspended)"). I tried marking the node as offline and bringing it back online - no change. I tried disconnecting and reconnecting the slave - no change.

          Nick Parrish added a comment -

          Deleting and re-creating the slave was the only way I found to fix this.

          Nick Parrish added a comment - Deleting and re-creating the slave was the only way I found to fix this.

          I could fix it through groovy console by manually calling setAcceptingTasks(true). Sorry, don't remember exact command

          Vitalii Tymchyshyn added a comment - I could fix it through groovy console by manually calling setAcceptingTasks(true). Sorry, don't remember exact command

          Thomas Fürer added a comment -

          same issue here

          Thomas Fürer added a comment - same issue here

          Calin Marina added a comment - - edited

          hi ... I had the same problem and Vitalii's hint was very usefull ... I needed a bit through the javadoc to get the proper command though

          here it is in case other people need it:

          hudson.model.Hudson.instance.slaves.getNode("cloud_selenium2").toComputer().setAcceptingTasks(true)

          Calin Marina added a comment - - edited hi ... I had the same problem and Vitalii's hint was very usefull ... I needed a bit through the javadoc to get the proper command though here it is in case other people need it: hudson.model.Hudson.instance.slaves.getNode( "cloud_selenium2" ).toComputer().setAcceptingTasks( true )

          I saw this with version 1.551.

          Thomas Van Doren added a comment - I saw this with version 1.551.
          Daniel Beck made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: slave-status [ 15981 ]
          Andrew Barber made changes -
          Attachment New: screenshot-1.png [ 31815 ]

          Andrew Barber added a comment - - edited

          It's 2016 and I still see this bug in 1.643. Groovy console command slightly changed

          ○ Jenkins.instance.getNode("node-name").toComputer().setAcceptingTasks(true)

          It's a shame that this type of issue has been sitting here so long.

          Andrew Barber added a comment - - edited It's 2016 and I still see this bug in 1.643. Groovy console command slightly changed ○ Jenkins.instance.getNode("node-name").toComputer().setAcceptingTasks(true) It's a shame that this type of issue has been sitting here so long.

            mawinter69 Markus Winter
            tivv Vitalii Tymchyshyn
            Votes:
            11 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: