jenkinsci / jenkinsci/ec2-plugin

[JENKINS-23938] New nodes are launched when labels changed in EC2 configuration

Open
#1,341 0 comments 0 reactions 0 assignees View on GitHub
agent component:ec2-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
292
Forks
709
Avg merge
3d 16h
Merged PRs (30d)
4

Description

When the set of labels is changed for a configured slave in the EC2 plugin's global config (under "Configure Jenkins"), it forgets about existing nodes and launches new ones.

It should instead relabel existing nodes with the new labels on first launch. Or at least terminate the old nodes. As it is, you land up with a bunch of duplicate nodes.

Observed with idle timeout enabled, and stop on idle enabled, with nodes idled down at the time of configuration change.

---
Originally reported by ringerc, imported from: New nodes are launched when labels changed in EC2 configuration


  • assignee: francisu
  • status: Open
  • priority: Major
  • component(s): ec2-plugin
  • label(s): ec2, labels, slave
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-06

Raw content of original issue

When the set of labels is changed for a configured slave in the EC2 plugin's global config (under "Configure Jenkins"), it forgets about existing nodes and launches new ones.

It should instead relabel existing nodes with the new labels on first launch. Or at least terminate the old nodes. As it is, you land up with a bunch of duplicate nodes.

Observed with idle timeout enabled, and stop on idle enabled, with nodes idled down at the time of configuration change.

  • environment: EC2-plugin 1.23

Contributor guide

Open the contributing guide

Research direction

Start with the EC2 plugin's global configuration and the node lifecycle handling described in the issue. Reproduce the change with idle timeout and stop-on-idle enabled, then verify that changing labels updates or removes existing idle nodes instead of launching duplicates.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.