Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-71655: Add support for AMIs without instance metadata support #874

Merged
merged 9 commits into from
Jul 26, 2023

Conversation

nagrubb
Copy link
Contributor

@nagrubb nagrubb commented Jul 16, 2023

After https://issues.jenkins.io/browse/JENKINS-65127 was introduced with #609, AMIs without Instance Metadata support were broken. When they were provisioned, they wouldn't get key pairs properly installed by AWS EC2 (the init script on the AMIs would get stuck on waiting to access instance-metadata).

This change introduces a new option to indicate if an AMI does not support instance metadata and thus no InstanceMetadataOptionsRequest will be included in the EC2 request to provision an instance.

Testing done

  • Introduced a new automated test SlaveTemplateTest.provisionOnDemandWithUnsupportedInstanceMetadata()
  • Ran mvn test to make sure no other tests were broken.
  • Ran mvn hpi:run to make sure the UI showed the new option for metadata supported.

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options
Loading

instanceMetadata

@nagrubb nagrubb marked this pull request as draft July 16, 2023 05:42
@nagrubb nagrubb marked this pull request as ready for review July 16, 2023 06:33
@nagrubb nagrubb marked this pull request as draft July 17, 2023 19:43
@nagrubb nagrubb marked this pull request as ready for review July 23, 2023 20:20
@nagrubb
Copy link
Contributor Author

nagrubb commented Jul 25, 2023

@warrior8792 @res0nance Could you help to review this please?

@res0nance res0nance merged commit 4e585c3 into jenkinsci:master Jul 26, 2023
16 checks passed
@nagrubb
Copy link
Contributor Author

nagrubb commented Jul 27, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account?