Skip to content

Commit

Permalink
Azure: fallback nic needs to be reevaluated during reprovisioning (#1094
Browse files Browse the repository at this point in the history
)

During reprovisioning, VM network will change. fallback nic
should be cleared after use so that it can be re-evaluated after
reprovisioning
  • Loading branch information
anhvoms authored Nov 2, 2021
1 parent 48467aa commit ff415ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloudinit/sources/DataSourceAzure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ff415ca

Please sign in to comment.