Skip to content

Fixing _get_network_card issue with exahausting retry budget.#157

Open
joeysk2012 wants to merge 1 commit into
amazonlinux:mainfrom
joeysk2012:get-network-card-fix
Open

Fixing _get_network_card issue with exahausting retry budget.#157
joeysk2012 wants to merge 1 commit into
amazonlinux:mainfrom
joeysk2012:get-network-card-fix

Conversation

@joeysk2012

Copy link
Copy Markdown
Contributor

Issue #, if available:
#153 attempted to fix a bug where network card is delayed from IMDS and incorrectly assigns the wrong metric to the ENI. This fix had a few issues after testing:

  1. network_card was un-initialized therefore when .no-network-card was set, it ran into: unbound-variable error on line 559 when trying to echo it.
  2. The propagation delay is larger than we thought because it could not even find the device-number. We increased the retries to 120 from 40 during such scenario.
  3. When the function _get_network_card exhausts retries, we used to mark .no-network-card this is not a stable signal because it's hard to tell if there is no network-card index other than 0, or just a propagation delay or garbage value. Instead we use .has-network-cards marker to either increase the retries or keep the retries to 40.

Description of changes:
This PR initializes the network_card variable, increases the number of retires to 120ms when a non-zero network-card is detected and provides the marker .has-network-cards instead of .no-network-card.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

2 participants