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

Use 1s timeout for fetching imdsv2 token #1626

Merged
merged 1 commit into from Mar 2, 2022

Conversation

saracen
Copy link
Contributor

@saracen saracen commented Mar 2, 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.

The AWS SDK solved this by setting a 1s timeout for the metadata service request. This PR adds the same timeout.

Closes #1625

@harshavardhana harshavardhana merged commit f2d40be into minio:master Mar 2, 2022
@saracen saracen deleted the fix-imds-timeout branch March 2, 2022 20:58
@justfalter
Copy link

justfalter commented Mar 11, 2022

@harshavardhana Any chance that we can get a release that includes this change? The 120s delay is very painful!

justfalter added a commit to justfalter/bazel-remote that referenced this pull request Mar 11, 2022
- Update minio-go so that we can get a fix for timeouts encountered when
  trying to retrieve IMDSv2 tokens during IAM s3 authentication. When
  bazel-remote is run within a container on an aws ec2 instance, initial
  attempts to authenticate using IAM will encounter a 120s delay. The
  issue is the result of changes in the ec2 metadata services with
  IMDSv2, which restricts how many network hops may be incurred before
  for PUT statements. When executing directly on the ec2 instance, it
  is 1 hop away, and is allowed. When executing within a docker
  container on an ec2 instance, it is 2 hops away, and is forbidden. The
  change to minio go reduces the timeout from 120s to 1s. Apparently
  this token request is optional, so things continue to work afterward,
  regardless.
  minio/minio-go#1626
mostynb pushed a commit to buchgr/bazel-remote that referenced this pull request Mar 11, 2022
- Update minio-go so that we can get a fix for timeouts encountered when
  trying to retrieve IMDSv2 tokens during IAM s3 authentication. When
  bazel-remote is run within a container on an aws ec2 instance, initial
  attempts to authenticate using IAM will encounter a 120s delay. The
  issue is the result of changes in the ec2 metadata services with
  IMDSv2, which restricts how many network hops may be incurred before
  for PUT statements. When executing directly on the ec2 instance, it
  is 1 hop away, and is allowed. When executing within a docker
  container on an ec2 instance, it is 2 hops away, and is forbidden. The
  change to minio go reduces the timeout from 120s to 1s. Apparently
  this token request is optional, so things continue to work afterward,
  regardless.
  minio/minio-go#1626
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.

IMDSv2 slow response
3 participants