From b2b7ce8c9d56548469ae1b6b72affd4efb8056f2 Mon Sep 17 00:00:00 2001 From: Anh Vo Date: Tue, 2 Nov 2021 11:37:24 -0700 Subject: [PATCH] clear fallback interface before reprovisioning --- cloudinit/sources/DataSourceAzure.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index d52c6a7f4cd..93493fa01a4 100755 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -498,6 +498,11 @@ def crawl_metadata(self): self.fallback_interface, retries=10 ) + + # reset _fallback_interface so that if the code enters reprovisioning + # flow, it will force re-evaluation of new fallback nic. + self._fallback_interface = None + if not imds_md and not ovf_is_accessible: msg = 'No OVF or IMDS available' report_diagnostic_event(msg)