-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Improve the retry attempts, error conditions, and IPv6 attempts for fetching ec2 metadata from IMDS #314427
base: master
Are you sure you want to change the base?
Conversation
token="" | ||
|
||
# first test ipv4 | ||
token=$( |
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 will add a 10 second delay to booting machines in an IPv6 subnet. I don't think that is desirable.
I think we need to rethink this script instead of patching this in. This is getting very complex
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.
Agreed. While implementing this I think there should be a separate trigger or method for identifying which connectivity is preferred, then use that connectivity explicitly.
I'm curious if there's a way we could query the interfaces attached and see if any ipv6 address is available, if so, then we try that first.
But I still think it's odd that dhcp grants ipv6 before ipv4...
What ideas do you have for this script? I'm happy to help implement
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.
But I still think it's odd that dhcp grants ipv6 before ipv4...
It's just a race condition. Sometimes you get the IPv4 lease sometimes the IPv6 lease first
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.
The script could try ipv4/6 back and forth until it finds a working token rather than trying all at once. i.e. we move the retry logic out of curl's opts and into the bash function.
Description of changes
Why: NixOS/amis#137
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.