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

Preview Give feedback

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
@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? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants