jenkinsci / amazon-ecs-plugin

Amazon EC2 Container Service Plugin for Jenkins
https://plugins.jenkins.io/amazon-ecs
MIT License
193 stars 227 forks source link

The number of executors is not set on ECS Agent #326

Closed k3np closed 8 months ago

k3np commented 1 year ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.401.3 OS: Linux - 5.10.184-175.749.amzn2.x86_64 Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- amazon-ecs:1.48 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

ECS Fargate for both Controller and Agent

Reproduction steps

  1. Set Number of executors per agent per agent to 4 in Cloud -> Amazon EC2 Container Service Cloud -> Advanced -> Number of executors per agent
  2. Start Job
  3. Wait until agent is provisioned

Expected Results

The number of executors in the ECS Agent is 4

Actual Results

The number of executors in the ECS Agent is 1

Anything else?

The settings can be verified with script console

// Print NumExecutors in ECS Cloud settings
println "NumExecutors: " + com.cloudbees.jenkins.plugins.amazonecs.ECSCloud.getByName("ecs").getNumExecutors()
// Result: NumExecutors: 4

// Print NumExecutors in ECS Agent
jenkins.model.Jenkins.instance.nodes.each { node ->
  println "NumExecutors: " + node.getNumExecutors()
}
// NumExecutors: 1
// Result: [com.cloudbees.jenkins.plugins.amazonecs.ECSSlave[ecs-test-pn3pf]]