You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-72370] SimpleScheduledRetentionStrategy isn't working with inbound agents #18821
Create an agent with Launch method "Launch agent by connecting it to the controller"
Set Availability to "Bring this agent online according to a schedule"
Configure Startup schedule to "0 0 * * *" and scheduled uptime to "5" (basically the agent should not accept tasks)
Connect the agent.
Create a freestyle job that should run on that agent exclusively
run the job
Expected result
the job never runs
Actual result
the job gets executed
Details
SimpleScheduledRetentionStrategy disconnects agents and then does computer.setAcceptingTasks(false)
After a few seconds after the disconnection, the agents java process reconnects the agent which also sets the setAcceptingTasks to true for the agent.
Fix
SimpleScheduledRetentionStrategy should implement isAcceptingTasks and remove the explicit calls to __ computer.setAcceptingTasks(false)
Create an agent with Launch method "Launch agent by connecting it to the controller"
Set Availability to "Bring this agent online according to a schedule"
Configure Startup schedule to "0 0 * * *" and scheduled uptime to "5" (basically the agent should not accept tasks)
Connect the agent.
Create a freestyle job that should run on that agent exclusively
run the job
Expected result
the job never runs
Actual result
the job gets executed
Details
SimpleScheduledRetentionStrategy disconnects agents and then does computer.setAcceptingTasks(false)
After a few seconds after the disconnection, the agents java process reconnects the agent which also sets the setAcceptingTasks to true for the agent.
Fix
SimpleScheduledRetentionStrategy should implement isAcceptingTasks and remove the explicit calls to __ computer.setAcceptingTasks(false)
Activity
jenkins-infra-bot commentedon Nov 24, 2023
Remote link associated with this issue:
jenkins-infra-bot commentedon Nov 24, 2023
mawinter69:
Raw content of original comment:
The wrong behaviour is also the cause for
JENKINS-11889