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

feat: add a retry mechanism to retrieve source interface IP #7

Closed
wants to merge 2 commits into from

Conversation

fdomain
Copy link

@fdomain fdomain commented Jul 25, 2023

When using the route_source_interface_ipv4 option on the PTP plugin, and if the interface specified in this option is created by another CNI plugin called simultaneously with the first plugin, there's a good chance that the PTP plugin will return an error because the interface is not yet ready (with a configured IP). To guard against this eventuality, we've implemented a retry mechanism around the code responsible for obtaining the interface's IP address; in the event of an error, it will retry until the maximum retry threshold is reached.

Changes:

  • added a retry mechanism (10 retries max) with a sleep interval of 1s to the function that retrieves the interface and its IP address

@Lqp1 Lqp1 requested a review from a team July 26, 2023 10:49
* getIntfIP func could return an error if the concerned interface is not
  created yet on the container namespace
* add a retry mechanism (10 attempts max) with a sleep interval of 1s
  to the function getting the interface and its IP address
@github-actions
Copy link

This PR has been untouched for too long without an update. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 25, 2023
@fdomain
Copy link
Author

fdomain commented Sep 25, 2023

closing this PR as we found another solution for this (iptables rule)

@fdomain fdomain closed this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants