jenkinsci / jenkinsci/ec2-plugin

[JENKINS-72228] Amazon EC2 Plugin - Cannot save live node config if "Instance Metadata Supported?" (metadataSupported) is checked

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

Description

Jenkins Amazon EC2 plugin version 1628.v6d7b_fc58b_a_1d "can't save instance config" bug can be reproduced by -



  1. As noted in "Environment" section above, ensure in Cloud configuration for launching an EC2 node: ensure "Instance Metadata Supported?" is checked (enabled)

  2. Launch a node

  3. Edit that node's config, change any setting except "Instance Metadata Supported?", and click "Save"

  4. Angry Jenkins shows up

  5. Go back and uncheck "Instance Metadata Supported?" and click "Save" - it will work this time

The logs show a large stack trace, of which this is the pertinent part:

Caused: java.lang.IllegalArgumentException: Failed to convert the metadataSupported parameter of the constructor public hudson.plugins.ec2.EC2OndemandSlave 

 

Effect of the bug: You are unable to change the node configuration after launch, and keep "Instance Metadata Supported?" sub-options enabled at the same time

---
Originally reported by dkhaykin, imported from: Amazon EC2 Plugin - Cannot save live node config if "Instance Metadata Supported?" (metadataSupported) is checked


  • assignee: thoulen
  • status: Open
  • priority: Minor
  • component(s): ec2-plugin
  • label(s): plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-12-06

Raw content of original issue

Jenkins Amazon EC2 plugin version 1628.v6d7b_fc58b_a_1d "can't save instance config" bug can be reproduced by -



  1. As noted in "Environment" section above, ensure in Cloud configuration for launching an EC2 node: ensure "Instance Metadata Supported?" is checked (enabled)

  2. Launch a node

  3. Edit that node's config, change any setting except "Instance Metadata Supported?", and click "Save"

  4. Angry Jenkins shows up

  5. Go back and uncheck "Instance Metadata Supported?" and click "Save" - it will work this time

The logs show a large stack trace, of which this is the pertinent part:



Caused: java.lang.IllegalArgumentException: Failed to convert the metadataSupported parameter of the constructor public hudson.plugins.ec2.EC2OndemandSlave 


 

Effect of the bug: You are unable to change the node configuration after launch, and keep "Instance Metadata Supported?" sub-options enabled at the same time

environment

```
Relevant Environemnt:

- OS: Amazon Linux 2

- Jenkins Version: 2.414.3

- Amazon EC2 plugin version: 1628.v6d7b_fc58b_a_1d

Java Version:

- openjdk 11.0.20.1 2023-08-22 LTS

- OpenJDK Runtime Environment Corretto-11.0.20.9.1 (build 11.0.20.1+9-LTS)

- OpenJDK 64-Bit Server VM Corretto-11.0.20.9.1 (build 11.0.20.1+9-LTS, mixed mode)

Cloud configuration (https://your-jenkins-url/manage/cloud/your-cloud/configure) -> AMI section:

- Ensure "Instance Metadata Supported?" is checked (enabled)
```

Contributor guide

Open the contributing guide

Research direction

Start at the EC2OndemandSlave constructor and trace how the metadataSupported parameter is converted when saving a launched node's configuration. Reproduce the issue with Instance Metadata Supported? enabled, then verify that changing another setting saves successfully while the metadata sub-options remain enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.