DEVPROD-13207: set EC2 hostname during host provisioning #8775
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DEVPROD-13207
Description
This is half of the change for DEVPROD-13207 - this change makes so that the EC2 hostname is set in Evergreen before it runs its first task. Re this comment, we can't just get the hostname directly from Evergreen currently, because Evergreen may not have fetched the hostname from EC2 yet. To work around this, EC2 hosts will provide their own hostname from the locally-available EC2 instance metadata on the host. The host will then send that hostname back to Evergreen.
After this is merged, I'll post a follow-up PR to expose the hostname as an OTel attribute for tasks.
Testing