Removing uncessary IMDS calls and empty configs before applying#118
Merged
saiharsha1994 merged 1 commit intoamazonlinux:mainfrom May 6, 2025
Merged
Removing uncessary IMDS calls and empty configs before applying#118saiharsha1994 merged 1 commit intoamazonlinux:mainfrom
saiharsha1994 merged 1 commit intoamazonlinux:mainfrom
Conversation
627c4db to
51fa8c2
Compare
e4dabe9 to
013f142
Compare
We want to remove the IMDS call which is made for the ipv6-cidr block for ipv4 interfaces by checking to see if supports ipv6 first. Then we want to prevent the case where IMDS is throttled, an empty local-ipv4 is returned and the script overwrites an existing config using _install_and_reload. We want to make sure value are not empty before overwriting anything.
Contributor
Author
|
Reviewed PR internally and approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If ip address from IMDS comes back as empty, ec2-net-utils will not overwrite and config file and return 0.
This is okay to do as we do not expect empty information to overwrite the config.
Does not affect Interface removal/deletion because it follows a separate code flow and process.
Turn off ipv6 IMDS information if the interface is non-ipv6.
It was retrying 10 times every time we boot up. This also speeds up boot time.
Testing will be done internally.