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

IMDSv2 slow response #1625

Closed
saracen opened this issue Mar 1, 2022 · 1 comment · Fixed by #1626
Closed

IMDSv2 slow response #1625

saracen opened this issue Mar 1, 2022 · 1 comment · Fixed by #1626
Labels

Comments

@saracen
Copy link
Contributor

saracen commented Mar 1, 2022

#1489 introduced IMDSv2 support. Similar to the issues described in the official AWS SDK (aws/aws-sdk-go#2972), the IAM credential provider potentially introduces a several minute delay.

A workaround appears to be to adjust the EC2 instances hop limit (details regarding this are also discussed in the aws-sdk-go issue).

The official SDK solved this by setting a 1s timeout for the metadata service request. This bug affects many users of GitLab-Runner (https://gitlab.com/gitlab-org/gitlab-runner/-/issues/28656), and whilst I can fix this in Runner by adjusting the client transport, this will affect all requests and might have ramifications beyond fixing just this problem.

Are we okay to add a similar solution to the official SDK? Maybe by coping the transport and setting a timeout of 1s just for the fetchIMDSToken call? If so, and unless anybody else beats me to this, I should be able to work on this tomorrow.

@harshavardhana
Copy link
Member

Are we okay to add a similar solution to the official SDK? Maybe by coping the transport and setting a timeout of 1s just for the fetchIMDSToken call? If so, and unless anybody else beats me to this, I should be able to work on this tomorrow.

Sure feel free to send a PR @saracen

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 a pull request may close this issue.

2 participants