diff options
-rw-r--r-- | cloudinit/sources/helpers/vultr.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/sources/helpers/vultr.py b/cloudinit/sources/helpers/vultr.py index 9848f8fd..350ba4ab 100644 --- a/cloudinit/sources/helpers/vultr.py +++ b/cloudinit/sources/helpers/vultr.py @@ -21,9 +21,11 @@ def get_metadata(url, timeout, retries, sec_between, agent): # Seek iface with DHCP for iface in net.get_interfaces(): - # Skip dummy interfaces + # Skip dummy, lo interfaces if "dummy" in iface[0]: continue + if "lo" == iface[0]: + continue try: with EphemeralDHCPv4( iface=iface[0], connectivity_url_data={"url": url} @@ -33,7 +35,7 @@ def get_metadata(url, timeout, retries, sec_between, agent): # Fetch the metadata v1 = read_metadata(url, timeout, retries, sec_between, agent) - except (NoDHCPLeaseError) as exc: + except (NoDHCPLeaseError, subp.ProcessExecutionError) as exc: LOG.error("DHCP Exception: %s", exc) exception = exc |