-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: core
-
Environment:latest Jenkins core (2.433)
-
2.439
How to reproduce
- 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)
- relates to
-
JENKINS-11889 Suspended agents do not start accepting tasks when policy changed
-
- Resolved
-
- links to