From c5403553088bb6fadafb86d6879bfce7fc90bdb7 Mon Sep 17 00:00:00 2001 From: hzliaoyuehua Date: Fri, 22 May 2020 17:44:25 +0800 Subject: [PATCH] network: add retries for get network adapter name by MAC's address Add more retries for get network adapter name by MAC's address. --- cloudbaseinit/osutils/windows.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloudbaseinit/osutils/windows.py b/cloudbaseinit/osutils/windows.py index 605ffa1f..f706ef35 100644 --- a/cloudbaseinit/osutils/windows.py +++ b/cloudbaseinit/osutils/windows.py @@ -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( + 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