-
Notifications
You must be signed in to change notification settings - Fork 108
updated to IMDSv2 #5783
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
updated to IMDSv2 #5783
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
| 2024-07-08T16:51:04.0872992Z [36;1m echo "Runner is from Google Cloud Platform, No info on ec2 metadata"[0m | ||
| 2024-07-08T16:51:04.0873605Z [36;1m else[0m | ||
| 2024-07-08T16:51:04.0874108Z [36;1m curl -fsSL "http://169.254.169.254/latest/meta-data/${category}"[0m | ||
| 2024-07-08T16:51:04.0874108Z [36;1m curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"[0m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is log now historically inaccurate, lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted the log change ;)
| }) | ||
| // convert these two curls: | ||
| // curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}" | ||
| const tokenResponse = await http.put( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this bit could be tested by identifying a workflow that uses it and modifying the reference to point to this PR's branch. Let me know if you need help with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on pytorch/pytorch#139330 - seems to work: https://github.com/pytorch/pytorch/actions/runs/11602944927/job/32308974862?pr=139330#step:6:27 prints the instance id as url
this is a follow up on PR #5783 that enabled IMDSv2. We're about to remove support for IMDSv1 on our AWS account globally This is part of an effort to move all our calls across all pytorch repos to v2. See also: pytorch/FBGEMM#3297 pytorch/pytorch#138286 meta-pytorch/torchsnapshot#180 meta-pytorch/torchrec#2532 meta-pytorch/torcheval#210
No description provided.