Skip to content

network: add retries for get network adapter name by MAC's address #48

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cloudbaseinit/osutils/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,8 @@ def set_ntp_client_config(self, ntp_hosts):
'w32tm failed to configure NTP.\nOutput: %(out)s\nError:'
' %(err)s' % {'out': out, 'err': err})

@retry_decorator.retry_decorator(
Copy link
Member

Choose a reason for hiding this comment

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

I would advise to set the service to automatic delayed start in these cases. If the OS does not see the adapter, there is a problem with the nic drivers or a concurrency issue between the cloudbase-init service and the networking service.

max_retry_count=30, exceptions=exception.ItemNotFoundException)
def get_network_adapter_name_by_mac_address(self, mac_address):
iface_index_list = [
net_addr for net_addr
Expand Down