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

[1.28] RHEL-9435: Get AWS metadata via IMDSv2 #3352

Merged

Conversation

m-horky
Copy link
Contributor

@m-horky m-horky commented Nov 1, 2023

  • Card ID: RHEL-9435

Even though both versions are officially supported, the AWS teams are tracking connections making v1 requests as WARNINGs 0.

This patch switches the order to try to use IMDSv2 first.

Cherry-picked from 953f2df.

@m-horky m-horky requested a review from jirihnidek November 1, 2023 12:14
@m-horky m-horky marked this pull request as draft November 1, 2023 15:13
* Card ID: RHEL-9435

Even though both versions are officially supported, the AWS teams are
tracking connections making v1 requests as WARNINGs [0].

This patch switches the order to try to use IMDSv2 first.

[0]: https://github.com/aws/aws-imds-packet-analyzer

Cherry-picked from 0eab79b.
The function responsible for returning 'server' responses was altered to
be less nested, which should improve its readability.

Cherry-picked from 4d8fcd4.
@m-horky m-horky force-pushed the mhorky/RHEL-9435_aws-imdsv2_1.28 branch from 9f070df to 944fd03 Compare November 1, 2023 16:47
Copy link

github-actions bot commented Nov 1, 2023

Coverage

Coverage (computed on Fedora latest) •
FileStmtsMissCoverMissing
cloud_what/providers
   aws.py1834575%90, 113, 150–151, 153–154, 157–158, 160, 169, 172–173, 203, 207–208, 217–218, 257, 269, 331, 397–398, 400–401, 403–407, 409–414, 416–420, 422–425, 431
TOTAL22288923558% 

Tests Skipped Failures Errors Time
2361 11 💤 0 ❌ 0 🔥 1m 9s ⏱️

@m-horky m-horky marked this pull request as ready for review November 1, 2023 16:53
Copy link
Contributor

@jirihnidek jirihnidek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@jirihnidek jirihnidek merged commit a67c5d6 into subscription-manager-1.28 Nov 6, 2023
10 checks passed
@jirihnidek jirihnidek deleted the mhorky/RHEL-9435_aws-imdsv2_1.28 branch November 6, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants