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

Azure: Retry getting network metadata during nic attach for all non-timeout errors #878

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

aswinrajamannar
Copy link
Contributor

@aswinrajamannar aswinrajamannar commented Apr 19, 2021

Proposed Commit Message

Azure: Retry getting network metadata during nic attach for all non-timeout errors.

Summary

When network interfaces are hot-attached to the VM, attempting to get network metadata might return 410 (or 500, 503 etc) because the info is not yet available. In those cases, we retry getting the metadata before giving up. The only case where we can move on to wait for more nic attach events is if the call times out despite retries, which means the interface is not likely a primary interface, and we should try for more nic attach events.

Test Steps

  • Deploy Pre-provisioned VM in Azure of type "savable" (internal to Azure)
  • Reuse the VM with one or more network interfaces
  • When repeating this multiple times, some of them might fail if the platform is not ready to serve the network metadata

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@aswinrajamannar aswinrajamannar force-pushed the nicattach_fix branch 2 times, most recently from 1b6acc0 to 822cf05 Compare April 20, 2021 21:40
@aswinrajamannar aswinrajamannar changed the title Azure: Retry getting network metadata during nic attach when we get 410 Azure: Retry getting network metadata during nic attach for all non-timeout errors Apr 20, 2021
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheRealFalcon TheRealFalcon merged commit b231166 into canonical:master Apr 26, 2021
@aswinrajamannar aswinrajamannar deleted the nicattach_fix branch May 20, 2021 04:54
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