Skip to content

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

Merged
TheRealFalcon merged 2 commits into
canonical:masterfrom
aswinrajamannar:nicattach_fix
Apr 26, 2021
Merged

Azure: Retry getting network metadata during nic attach for all non-timeout errors#878
TheRealFalcon merged 2 commits into
canonical:masterfrom
aswinrajamannar:nicattach_fix

Conversation

@aswinrajamannar
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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