Skip to content

Azure: Limit polling network metadata on connection errors#961

Merged
TheRealFalcon merged 4 commits into
canonical:mainfrom
aswinrajamannar:primarynicfix
Aug 10, 2021
Merged

Azure: Limit polling network metadata on connection errors#961
TheRealFalcon merged 4 commits into
canonical:mainfrom
aswinrajamannar:primarynicfix

Conversation

@aswinrajamannar
Copy link
Copy Markdown
Contributor

@aswinrajamannar aswinrajamannar commented Aug 5, 2021

Proposed Commit Message

Azure: Limit polling network metadata on connection errors

Description

This is a follow up to #878 where we currently limit polling on network metadata to 10 retries if the calls fail due to timeout errors. After enabling the feature in Azure, we noticed that if secondary nic is attached first, the calls could also fail with network unreachable ConnectionError. In these cases as well, we shouldn't poll indefinitely, and instead move on to listen for more nic attach events.

Test Steps

  • Deploy a multi-nic VM in Azure that goes through the nic hot-attach code path. In a few cases where the secondary nic is attached first, the VM deployment might fail if this fix is missing.

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

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.

Looks good to me! I left two nit suggestions inline.

Comment thread cloudinit/sources/DataSourceAzure.py Outdated
Comment thread tests/unittests/test_datasource/test_azure.py Outdated
aswinrajamannar and others added 3 commits August 10, 2021 12:07
Co-authored-by: James Falcon <therealfalcon@gmail.com>
Co-authored-by: James Falcon <therealfalcon@gmail.com>
@aswinrajamannar
Copy link
Copy Markdown
Contributor Author

Looks good to me! I left two nit suggestions inline.

Thanks. Committed the suggestions.

@TheRealFalcon TheRealFalcon merged commit d327121 into canonical:main Aug 10, 2021
@aswinrajamannar aswinrajamannar deleted the primarynicfix branch August 10, 2021 21:00
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