-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.62, EC2 Plugin 1.36
...many other plugins that may or may not be relevant (?)
Yesterday I updated my EC2 Plugin configuration to include a user-data script that would overwrite a generic instance name tag value (e.g. development-continuous-integration-agent) with a dynamically generated instance name tag value (e.g. development-continuous-integration-agent-0863c5eec9ca0ee3d).
This morning I observed that build agents would no longer dynamically start up in order to handle job workloads. After digging into the logs I discovered that:
- when assigning build agents to jobs, in addition to labels, the EC2 Plugin also requires instance metadata (in this case tag values) to match
- if no existing instances satisfy the plugin's matching semantics in (1.) then it will attempt to launch more instances
- if an instance cap prevents additional instances from launching in (2.) then jobs will sit idle due to executor starvation
I was able to work around this issue by removing the generic name tag value from the EC2 Plugin configuration. That said, I would consider this to be a regression since you're superseding the default Jenkins label matching semantics in a way that restricts their usefulness. By that I mean, I can set up groups of static Jenkins nodes with heterogeneous hardware resources, etc., sharing the same label, whereas it would probably be harder to accomplish the same thing with EC2 Plugin nodes.
Happy to provide some log excerpts if they'd actually be helpful – it looks like they mostly just contain messages dumping the parameters to AWS describe-instances API calls that fail when the generic name tag is included and then succeed once it's been removed.