Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
Jenkins 2.277.4
ec2: 1.58
Description
Jenkins is scheduling jobs on machines that the EC2 plugin is terminating.
Jenkins Logs:
Build Log:
[2021-06-10T00:13:40.457Z] Running on EC2 (go-runner) - go-runner-ami (i-009304530cc4685ec) in /var/jenkins_home/workspace/go-mega-build_PR-28557
...
[2021-06-10T00:13:41.532Z] The recommended git tool is: git
Remote call on EC2 (go-runner) - go-runner-ami (i-009304530cc4685ec) failed
So put a cohesive timeline to this it appears that:
00:13:40.455+0000 [id=2488307]\tINFO\th.p.ec2.EC2RetentionStrategy#taskAccepted: maxTotalUses drained - suspending agent i-009304530cc4685ec"} - Suspend
00:13:40.457Z] Running on EC2 (go-runner) - go-runner-ami (i-009304530cc4685ec) in /var/jenkins_home/workspace/go-mega-build_PR-28557 - Schedule
00:13:41.560+0000 [id=97]\tINFO\th.p.ec2.EC2RetentionStrategy#postJobAction: Agent i-009304530cc4685ec is terminated due to maxTotalUses (1)"} - Terminate
All over the course of 5ms. It feels like there is something of a race condition happening unless how jobs are being counted has changed unexpectedly.