diff options
author | Anh Vo <anhvo@microsoft.com> | 2021-11-02 15:06:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 14:06:39 -0500 |
commit | ff415cad242deeefe6741dfed8d4f554d964fb04 (patch) | |
tree | c6bdf719ae43d8910ba17f750874302d8c4d3a14 | |
parent | 48467aa304fd2400cf291f816055af15af30f883 (diff) | |
download | vyos-cloud-init-ff415cad242deeefe6741dfed8d4f554d964fb04.tar.gz vyos-cloud-init-ff415cad242deeefe6741dfed8d4f554d964fb04.zip |
Azure: fallback nic needs to be reevaluated during reprovisioning (#1094)
During reprovisioning, VM network will change. fallback nic
should be cleared after use so that it can be re-evaluated after
reprovisioning
-rwxr-xr-x | cloudinit/sources/DataSourceAzure.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index d52c6a7f..93493fa0 100755 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -498,6 +498,11 @@ class DataSourceAzure(sources.DataSource): 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) |